offset=SeekBlob(image,6 /*sizeof(Header)*/,SEEK_SET);
if (offset < 0)
{
+ if (palette != NULL)
+ palette=DestroyImage(palette);
+ if (clone_info != NULL)
+ clone_info=DestroyImageInfo(clone_info);
BImgBuff=(unsigned char *) RelinquishMagickMemory(BImgBuff);
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
}
{
(void) CloseBlob(image);
colors=(XColor *) RelinquishMagickMemory(colors);
+ XDestroyImage(dps_image);
+ XFreeResources(display,visual_info,map_info,(XPixelInfo *) NULL,
+ (XFontStruct *) NULL,&resource_info,(XWindowInfo *) NULL);
return(GetFirstImageInList(image));
}
status=SetImageExtent(image,image->columns,image->rows,exception);
if (status == MagickFalse)
{
colors=(XColor *) RelinquishMagickMemory(colors);
+ XDestroyImage(dps_image);
+ XFreeResources(display,visual_info,map_info,(XPixelInfo *) NULL,
+ (XFontStruct *) NULL,&resource_info,(XWindowInfo *) NULL);
return(DestroyImageList(image));
}
switch (image->storage_class)
{
meta_image=DestroyImage(meta_image);
global_colormap=(unsigned char *) RelinquishMagickMemory(global_colormap);
+ info=(unsigned char *) RelinquishMagickMemory(info);
ThrowReaderException(ResourceLimitError,
"MemoryAllocationFailed");
}