File ImageMagick-CVE-2017-8347.patch of Package ImageMagick.8212

Index: ImageMagick-6.8.8-1/coders/exr.c
===================================================================
--- ImageMagick-6.8.8-1.orig/coders/exr.c	2017-05-09 15:31:49.618809846 +0200
+++ ImageMagick-6.8.8-1/coders/exr.c	2017-05-09 15:33:17.576281069 +0200
@@ -195,6 +195,7 @@ static Image *ReadEXRImage(const ImageIn
       if (LocaleCompare(image_info->filename,read_info->filename) != 0)
         (void) RelinquishUniqueFileResource(read_info->filename);
       read_info=DestroyImageInfo(read_info);
+      image=DestroyImageList(image);
       return((Image *) NULL);
     }
   hdr_info=ImfInputHeader(file);
@@ -219,6 +220,7 @@ static Image *ReadEXRImage(const ImageIn
       if (LocaleCompare(image_info->filename,read_info->filename) != 0)
         (void) RelinquishUniqueFileResource(read_info->filename);
       read_info=DestroyImageInfo(read_info);
+          image=DestroyImageList(image);
       ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
     }
   for (y=0; y < (ssize_t) image->rows; y++)