From: Cristy Date: Sat, 9 Feb 2019 12:49:16 +0000 (-0500) Subject: ... X-Git-Tag: 7.0.8-27~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69841e9f84e2d428c4f265f8c432a4adce32eab5;p=imagemagick ... --- diff --git a/coders/png.c b/coders/png.c index 986aaa5d3..76e36126f 100644 --- a/coders/png.c +++ b/coders/png.c @@ -6093,8 +6093,11 @@ static Image *ReadOneMNGImage(MngInfo* mng_info, const ImageInfo *image_info, image->background_color=mng_background_color; image->alpha_trait=UndefinedPixelTrait; image->delay=0; - (void) SetImageBackgroundColor(image,exception); - + if (SetImageBackgroundColor(image,exception) == MagickFalse) + { + chunk=(unsigned char *) RelinquishMagickMemory(chunk); + return(DestroyImageList(image)); + } if (logging != MagickFalse) (void) LogMagickEvent(CoderEvent,GetMagickModule(), " Insert backgd layer, L=%.20g, R=%.20g T=%.20g, B=%.20g",