exception);
if (status == MagickFalse)
- return(DestroyImageList(image));
+ {
+ color_image=DestroyImage(color_image);
+ return(DestroyImageList(image));
+ }
if ((image_info->ping == MagickFalse) && (jng_color_type >= 12))
{
AcquireMagickMemory(sizeof(ImageInfo));
if (alpha_image_info == (ImageInfo *) NULL)
- ThrowReaderException(ResourceLimitError,
- "MemoryAllocationFailed");
+ {
+ color_image=DestroyImage(color_image);
+ ThrowReaderException(ResourceLimitError,
+ "MemoryAllocationFailed");
+ }
GetImageInfo(alpha_image_info);
alpha_image=AcquireImage(alpha_image_info,exception);
if (alpha_image == (Image *) NULL)
{
- alpha_image=DestroyImage(alpha_image);
+ alpha_image_info=DestroyImageInfo(alpha_image_info);
+ color_image=DestroyImage(color_image);
ThrowReaderException(ResourceLimitError,
"MemoryAllocationFailed");
}
exception);
if (status == MagickFalse)
- return(DestroyImageList(image));
+ {
+ alpha_image=DestroyImage(alpha_image);
+ alpha_image_info=DestroyImageInfo(alpha_image_info);
+ color_image=DestroyImage(color_image);
+ return(DestroyImageList(image));
+ }
if (jng_alpha_compression_method == 0)
{