if (info == (unsigned char *) NULL)
{
meta_image=DestroyImage(meta_image);
+ global_colormap=(unsigned char *) RelinquishMagickMemory(global_colormap);
ThrowReaderException(ResourceLimitError,
"MemoryAllocationFailed");
}
if (info == (unsigned char *) NULL)
{
meta_image=DestroyImage(meta_image);
+ global_colormap=(unsigned char *) RelinquishMagickMemory(global_colormap);
ThrowReaderException(ResourceLimitError,
"MemoryAllocationFailed");
}
if (profile == (StringInfo *) NULL)
{
meta_image=DestroyImage(meta_image);
+ global_colormap=(unsigned char *) RelinquishMagickMemory(global_colormap);
ThrowReaderException(ResourceLimitError,
"MemoryAllocationFailed");
}
break;
status=SetImageExtent(image,image->columns,image->rows,exception);
if (status == MagickFalse)
- return(DestroyImageList(image));
+ {
+ global_colormap=(unsigned char *) RelinquishMagickMemory(global_colormap);
+ meta_image=DestroyImage(meta_image);
+ return(DestroyImageList(image));
+ }
/*
Decode image.
*/