From Wang Rui with small tweak from Robert Osfield, fix of memory leak in gif plugin when using GifImageStream
This commit is contained in:
@@ -546,6 +546,10 @@ GifImageStream** obj)
|
||||
}
|
||||
while (recordtype != TERMINATE_RECORD_TYPE);
|
||||
|
||||
// Delete the last allocated buffer to avoid memory leaks if we using GifImageStream
|
||||
if ( obj && *obj )
|
||||
delete [] buffer;
|
||||
|
||||
delete [] rowdata;
|
||||
*width_ret = giffile->SWidth;
|
||||
*height_ret = giffile->SHeight;
|
||||
|
||||
Reference in New Issue
Block a user