# HG changeset patch # User ccheung # Date 1364591920 25200 # Node ID 18d44c04282dd1b010ffd7af505dc0ef61f3195e # Parent f0c0139a2125b5d8715be38665ce4a0d07014c05 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 diff -r f0c0139a2125 -r 18d44c04282d hotspot/src/share/tools/launcher/wildcard.c --- a/hotspot/src/share/tools/launcher/wildcard.c Thu Apr 04 08:47:39 2013 -0400 +++ b/hotspot/src/share/tools/launcher/wildcard.c Fri Mar 29 14:18:40 2013 -0700 @@ -368,8 +368,10 @@ 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));