]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5382
authorCristy <urban-warrior@imagemagick.org>
Sun, 4 Feb 2018 20:11:57 +0000 (15:11 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sun, 4 Feb 2018 20:11:57 +0000 (15:11 -0500)
coders/xps.c

index af33671d0248dc5ecf8edb52722e7dfba79ba1f0..5a2e5bcaaad0ed8188ccbe2feda8404d7ad3f324 100644 (file)
@@ -273,7 +273,10 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
      else
        delegate_info=GetDelegateInfo("xps:color",(char *) NULL,exception);
   if (delegate_info == (const DelegateInfo *) NULL)
-    return((Image *) NULL);
+    {
+      image=DestroyImage(image);
+      return((Image *) NULL);
+    }
   density=AcquireString("");
   options=AcquireString("");
   (void) FormatLocaleString(density,MagickPathExtent,"%gx%g",