File ImageMagick-CVE-2018-10804.patch of Package ImageMagick.8768

diff --git a/coders/tiff.c b/coders/tiff.c
index 1721fb04b6..b1508e7bfb 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -3513,7 +3513,10 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info,
       {
         status=SetQuantumFormat(image,quantum_info,FloatingPointQuantumFormat);
         if (status == MagickFalse)
-          ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
+          {
+            quantum_info=DestroyQuantumInfo(quantum_info);
+            ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
+          }
       }
     if ((LocaleCompare(image_info->magick,"PTIF") == 0) &&
         (GetPreviousImageInList(image) != (Image *) NULL))

openSUSE Build Service is sponsored by