]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/1604
authorCristy <urban-warrior@imagemagick.org>
Tue, 18 Jun 2019 19:17:06 +0000 (15:17 -0400)
committerCristy <urban-warrior@imagemagick.org>
Tue, 18 Jun 2019 19:17:06 +0000 (15:17 -0400)
MagickWand/operation.c

index f53cf6dca7c18dbc98b8cd888dafe44e08a4d18b..2edf8d4b8733933374ef3448332f19072ca9efa1 100644 (file)
@@ -3868,7 +3868,10 @@ WandPrivate MagickBooleanType CLIListOperatorImages(MagickCLI *cli_wand,
           reconstruct_image=RemoveFirstImageFromList(&_images);
           /* FUTURE - produce Exception, rather than silent fail */
           if (reconstruct_image == (Image *) NULL)
-            break;
+            { 
+              image=DestroyImage(image);
+              break;
+            }
           metric=UndefinedErrorMetric;
           option=GetImageOption(_image_info,"metric");
           if (option != (const char *) NULL)