From: Cristy Date: Wed, 22 Nov 2017 13:15:22 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/873 X-Git-Tag: 7.0.7-12~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b97357e7f8d6ae848a4c699fe17db6fcf4bd7a9;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/873 --- diff --git a/coders/xpm.c b/coders/xpm.c index 2734c1ff5..76fee225a 100644 --- a/coders/xpm.c +++ b/coders/xpm.c @@ -430,7 +430,11 @@ static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception) */ status=SetImageExtent(image,image->columns,image->rows,exception); if (status == MagickFalse) - return(DestroyImageList(image)); + { + xpm_colors=DestroySplayTree(xpm_colors); + xpm_buffer=DestroyString(xpm_buffer); + return(DestroyImageList(image)); + } for (y=0; y < (ssize_t) image->rows; y++) { p=NextXPMLine(p);