6886868: giflib has a memory leak in the MakeMapObject() function

Free() the object before returning NULL

Reviewed-by: art, dcherepanov
This commit is contained in:
Anthony Petrov 2009-10-01 14:48:05 +04:00
parent d091c784ed
commit 92d4496fac

View File

@ -88,6 +88,7 @@ MakeMapObject(int ColorCount,
Object->Colors = (GifColorType *)calloc(ColorCount, sizeof(GifColorType));
if (Object->Colors == (GifColorType *) NULL) {
free(Object);
return ((ColorMapObject *) NULL);
}