File ImageMagick-CVE-2019-16710.patch of Package ImageMagick.29977

diff --git a/coders/dot.c b/coders/dot.c
index 837023d44..094866e16 100644
--- a/coders/dot.c
+++ b/coders/dot.c
@@ -130,7 +130,10 @@ static Image *ReadDOTImage(const ImageInfo *image_info,ExceptionInfo *exception)
   image=AcquireImage(image_info);
   status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
   if (status == MagickFalse)
-    return((Image *) NULL);
+    {
+      image=DestroyImageList(image);
+      return((Image *) NULL);
+    }
   read_info=CloneImageInfo(image_info);
   SetImageInfoBlob(read_info,(void *) NULL,0);
   (void) CopyMagickString(read_info->magick,"SVG",MaxTextExtent);

openSUSE Build Service is sponsored by