]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/873
authorCristy <urban-warrior@imagemagick.org>
Wed, 22 Nov 2017 13:15:22 +0000 (08:15 -0500)
committerCristy <urban-warrior@imagemagick.org>
Wed, 22 Nov 2017 13:15:41 +0000 (08:15 -0500)
coders/xpm.c

index 2734c1ff56005b4d7ec5b0937b438173c14b7133..76fee225ac67d249a0092c0cca00c9da4bf03b5e 100644 (file)
@@ -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);