changeset 1823:cf3f9c09ba1d

6886868: giflib has a memory leak in the MakeMapObject() function Summary: free() the object before returning NULL Reviewed-by: art, dcherepanov
author anthony
date Thu, 01 Oct 2009 14:48:05 +0400
parents a21d00087df9
children 80db944866a9
files src/share/native/sun/awt/giflib/gifalloc.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/awt/giflib/gifalloc.c	Wed Sep 30 15:48:06 2009 +0400
+++ b/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);
     }