Skip to content

Commit 5982632

Browse files
author
Cristy
committed
https://github.com/ImageMagick/ImageMagick/issues/1616
1 parent e6654d8 commit 5982632

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: wand/mogrify.c

+3
Original file line numberDiff line numberDiff line change
@@ -7923,6 +7923,8 @@ WandExport MagickBooleanType MogrifyImageList(ImageInfo *image_info,
79237923
channel,metric,&distortion,exception);
79247924
if (difference_image == (Image *) NULL)
79257925
break;
7926+
reconstruct_image=DestroyImage(reconstruct_image);
7927+
image=DestroyImage(image);
79267928
if (*images != (Image *) NULL)
79277929
*images=DestroyImageList(*images);
79287930
*images=difference_image;
@@ -8265,6 +8267,7 @@ WandExport MagickBooleanType MogrifyImageList(ImageInfo *image_info,
82658267
q=GetImageFromList(*images,index-1);
82668268
if (q == (Image *) NULL)
82678269
{
8270+
p=DestroyImage(p);
82688271
(void) ThrowMagickException(exception,GetMagickModule(),
82698272
OptionError,"NoSuchImage","`%s'",argv[i+1]);
82708273
status=MagickFalse;

0 commit comments

Comments
 (0)