mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8005921: Memory leaks in vmStructs.cpp
Reviewed-by: dholmes, mikael, rasbold
This commit is contained in:
parent
e7e6443c6d
commit
cac8a55fb2
1 changed files with 6 additions and 4 deletions
|
@ -3112,10 +3112,10 @@ static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool
|
||||||
s[len-1] = '\0';
|
s[len-1] = '\0';
|
||||||
// tty->print_cr("checking \"%s\" for \"%s\"", s, typeName);
|
// tty->print_cr("checking \"%s\" for \"%s\"", s, typeName);
|
||||||
if (recursiveFindType(origtypes, s, true) == 1) {
|
if (recursiveFindType(origtypes, s, true) == 1) {
|
||||||
delete s;
|
delete [] s;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
delete s;
|
delete [] s;
|
||||||
}
|
}
|
||||||
const char* start = NULL;
|
const char* start = NULL;
|
||||||
if (strstr(typeName, "GrowableArray<") == typeName) {
|
if (strstr(typeName, "GrowableArray<") == typeName) {
|
||||||
|
@ -3131,10 +3131,10 @@ static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool
|
||||||
s[len-1] = '\0';
|
s[len-1] = '\0';
|
||||||
// tty->print_cr("checking \"%s\" for \"%s\"", s, typeName);
|
// tty->print_cr("checking \"%s\" for \"%s\"", s, typeName);
|
||||||
if (recursiveFindType(origtypes, s, true) == 1) {
|
if (recursiveFindType(origtypes, s, true) == 1) {
|
||||||
delete s;
|
delete [] s;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
delete s;
|
delete [] s;
|
||||||
}
|
}
|
||||||
if (strstr(typeName, "const ") == typeName) {
|
if (strstr(typeName, "const ") == typeName) {
|
||||||
const char * s = typeName + strlen("const ");
|
const char * s = typeName + strlen("const ");
|
||||||
|
@ -3148,8 +3148,10 @@ static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool
|
||||||
s[len - 6] = '\0';
|
s[len - 6] = '\0';
|
||||||
// tty->print_cr("checking \"%s\" for \"%s\"", s, typeName);
|
// tty->print_cr("checking \"%s\" for \"%s\"", s, typeName);
|
||||||
if (recursiveFindType(origtypes, s, true) == 1) {
|
if (recursiveFindType(origtypes, s, true) == 1) {
|
||||||
|
free(s);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
free(s);
|
||||||
}
|
}
|
||||||
if (!isRecurse) {
|
if (!isRecurse) {
|
||||||
tty->print_cr("type \"%s\" not found", typeName);
|
tty->print_cr("type \"%s\" not found", typeName);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue