mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 04:54:40 +02:00
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
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue