Commit b01c173c8 for imagemagick.org

commit b01c173c80eef74e831845cadad9b40e50fe01d0
Author: Dirk Lemstra <dirk@lemstra.org>
Date:   Sat May 23 17:03:01 2026 +0200

    Also close the image blob to make sure we close it properly.

diff --git a/coders/png.c b/coders/png.c
index 9662a4793..e1f89326e 100644
--- a/coders/png.c
+++ b/coders/png.c
@@ -7988,7 +7988,7 @@ static MagickBooleanType WriteOnePNGImage(MngWriteInfo *mng_info,
   const ImageInfo *IMimage_info,Image *IMimage,ExceptionInfo *exception)
 {
   Image
-    *image;
+    *volatile image;

   ImageInfo
     *image_info;
@@ -9443,6 +9443,7 @@ static MagickBooleanType WriteOnePNGImage(MngWriteInfo *mng_info,
         quantum_info=DestroyQuantumInfo(quantum_info);

       image_info=DestroyImageInfo(image_info);
+      (void) CloseBlob(image);
       image=DestroyImage(image);

       if (ping_have_blob != MagickFalse)