提交 c1d68a0a 编写于 作者: C ccheung

8006006: [parfait] Memory leak at hotspot/src/share/tools/launcher/wildcard.c

Summary: a simple fix to add FileList_free(fl) before returning NULL.
Reviewed-by: zgu, coleenp, minqi
上级 04d67797
......@@ -368,8 +368,10 @@ wildcardFileList(const char *wildcard)
const char *basename;
FileList fl = FileList_new(16);
WildcardIterator it = WildcardIterator_for(wildcard);
if (it == NULL)
if (it == NULL) {
FileList_free(fl);
return NULL;
}
while ((basename = WildcardIterator_next(it)) != NULL)
if (isJarFileName(basename))
FileList_add(fl, wildcardConcat(wildcard, basename));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册