File ImageMagick-CVE-2019-16713.patch of Package ImageMagick.19143

diff --git a/coders/dot.c b/coders/dot.c
index 094866e16..c22336cda 100644
--- a/coders/dot.c
+++ b/coders/dot.c
@@ -130,10 +130,7 @@ static Image *ReadDOTImage(const ImageInfo *image_info,ExceptionInfo *exception)
   image=AcquireImage(image_info);
   status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
   if (status == MagickFalse)
-    {
-      image=DestroyImageList(image);
-      return((Image *) NULL);
-    }
+    return(DestroyImageList(image));
   read_info=CloneImageInfo(image_info);
   SetImageInfoBlob(read_info,(void *) NULL,0);
   (void) CopyMagickString(read_info->magick,"SVG",MaxTextExtent);
@@ -148,7 +145,7 @@ static Image *ReadDOTImage(const ImageInfo *image_info,ExceptionInfo *exception)
   if (graph == (graph_t *) NULL)
     {
       (void) RelinquishUniqueFileResource(read_info->filename);
-      return ((Image *) NULL);
+      return(DestroyImageList(image));
     }
   option=GetImageOption(image_info,"dot:layout-engine");
   if (option == (const char *) NULL)
@@ -158,6 +155,7 @@ static Image *ReadDOTImage(const ImageInfo *image_info,ExceptionInfo *exception)
   gvRenderFilename(graphic_context,graph,(char *) "svg",read_info->filename);
   gvFreeLayout(graphic_context,graph);
   agclose(graph);
+  image=DestroyImageList(image);
   /*
     Read SVG graph.
   */

openSUSE Build Service is sponsored by