Commit f34065ecd for imagemagick.org

commit f34065ecd9512df16cb10083c8b4b46b5cd09b30
Author: Cristy <urban-warrior@imagemagick.org>
Date:   Fri Jun 5 09:22:15 2026 -0400

    https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-jfq9-q63x-rc63

diff --git a/coders/tiff.c b/coders/tiff.c
index c35110fbd..ba2540b23 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -3250,8 +3250,11 @@ static MagickBooleanType TIFFWritePhotoshopLayers(Image* image,
     return(MagickTrue);
   clone_info=CloneImageInfo(image_info);
   if (clone_info == (ImageInfo *) NULL)
-    ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
-      image->filename);
+    {
+      base_image=DestroyImage(base_image);
+      ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
+        image->filename);
+    }
   profile.offset=0;
   profile.quantum=MagickMinBlobExtent;
   layers=AcquireProfileStringInfo("tiff:37724",profile.quantum,