提交 57b0e93f 编写于 作者: D dholmes

8005921: Memory leaks in vmStructs.cpp

Reviewed-by: dholmes, mikael, rasbold
Contributed-by: NJeremy Manson <jeremymanson@google.com>
上级 30f876aa
......@@ -3112,10 +3112,10 @@ static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool
s[len-1] = '\0';
// tty->print_cr("checking \"%s\" for \"%s\"", s, typeName);
if (recursiveFindType(origtypes, s, true) == 1) {
delete s;
delete [] s;
return 1;
}
delete s;
delete [] s;
}
const char* start = NULL;
if (strstr(typeName, "GrowableArray<") == typeName) {
......@@ -3131,10 +3131,10 @@ static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool
s[len-1] = '\0';
// tty->print_cr("checking \"%s\" for \"%s\"", s, typeName);
if (recursiveFindType(origtypes, s, true) == 1) {
delete s;
delete [] s;
return 1;
}
delete s;
delete [] s;
}
if (strstr(typeName, "const ") == typeName) {
const char * s = typeName + strlen("const ");
......@@ -3148,8 +3148,10 @@ static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool
s[len - 6] = '\0';
// tty->print_cr("checking \"%s\" for \"%s\"", s, typeName);
if (recursiveFindType(origtypes, s, true) == 1) {
free(s);
return 1;
}
free(s);
}
if (!isRecurse) {
tty->print_cr("type \"%s\" not found", typeName);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册