6886868: giflib has a memory leak in the MakeMapObject() function
Summary: free() the object before returning NULL
Reviewed-by: art, dcherepanov
--- a/jdk/src/share/native/sun/awt/giflib/gifalloc.c Wed Sep 30 15:48:06 2009 +0400
+++ b/jdk/src/share/native/sun/awt/giflib/gifalloc.c Thu Oct 01 14:48:05 2009 +0400
@@ -88,6 +88,7 @@
Object->Colors = (GifColorType *)calloc(ColorCount, sizeof(GifColorType));
if (Object->Colors == (GifColorType *) NULL) {
+ free(Object);
return ((ColorMapObject *) NULL);
}