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:
parent
d091c784ed
commit
92d4496fac
@ -88,6 +88,7 @@ MakeMapObject(int ColorCount,
|
|||||||
|
|
||||||
Object->Colors = (GifColorType *)calloc(ColorCount, sizeof(GifColorType));
|
Object->Colors = (GifColorType *)calloc(ColorCount, sizeof(GifColorType));
|
||||||
if (Object->Colors == (GifColorType *) NULL) {
|
if (Object->Colors == (GifColorType *) NULL) {
|
||||||
|
free(Object);
|
||||||
return ((ColorMapObject *) NULL);
|
return ((ColorMapObject *) NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user