File ImageMagick-CVE-2019-13296.patch of Package ImageMagick.12048
diff --git a/MagickWand/operation.c b/MagickWand/operation.c
index f53cf6dca7..2edf8d4b87 100644
--- a/MagickWand/operation.c
+++ b/MagickWand/operation.c
@@ -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)