windowscodecs: Fix leak in DGifGetImageDesc.

This commit is contained in:
Vincent Povirk 2014-06-12 14:15:21 -05:00 committed by Alexandre Julliard
parent 831b7371bc
commit bb8fdb734e
1 changed files with 1 additions and 4 deletions

View File

@ -405,10 +405,7 @@ DGifGetImageDesc(GifFileType * GifFile) {
GifFile->Image.Interlace = (Buf[0] & 0x40); GifFile->Image.Interlace = (Buf[0] & 0x40);
if (Buf[0] & 0x80) { /* Does this image have local color map? */ if (Buf[0] & 0x80) { /* Does this image have local color map? */
/*** FIXME: Why do we check both of these in order to do this? FreeMapObject(GifFile->Image.ColorMap);
* Why do we have both Image and SavedImages? */
if (GifFile->Image.ColorMap && GifFile->SavedImages == NULL)
FreeMapObject(GifFile->Image.ColorMap);
GifFile->Image.ColorMap = MakeMapObject(1 << BitsPerPixel, NULL); GifFile->Image.ColorMap = MakeMapObject(1 << BitsPerPixel, NULL);
if (GifFile->Image.ColorMap == NULL) { if (GifFile->Image.ColorMap == NULL) {