Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/1616
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Jun 23, 2019
1 parent 63bf487 commit 5f21230
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions MagickWand/mogrify.c
Expand Up @@ -7908,6 +7908,8 @@ WandExport MagickBooleanType MogrifyImageList(ImageInfo *image_info,
&distortion,exception);
if (difference_image == (Image *) NULL)
break;
reconstruct_image=DestroyImage(reconstruct_image);
image=DestroyImage(image);
if (*images != (Image *) NULL)
*images=DestroyImageList(*images);
*images=difference_image;
Expand Down Expand Up @@ -8295,6 +8297,7 @@ WandExport MagickBooleanType MogrifyImageList(ImageInfo *image_info,
q=GetImageFromList(*images,index-1);
if (q == (Image *) NULL)
{
p=DestroyImage(p);
(void) ThrowMagickException(exception,GetMagickModule(),
OptionError,"NoSuchImage","`%s'",argv[i+1]);
status=MagickFalse;
Expand Down
5 changes: 4 additions & 1 deletion MagickWand/operation.c
Expand Up @@ -4171,7 +4171,10 @@ WandPrivate MagickBooleanType CLIListOperatorImages(MagickCLI *cli_wand,
{
index_image=GetImageFromList(_images,index-1);
if (index_image == (Image *) NULL)
CLIWandExceptArgBreak(OptionError,"NoSuchImage",option,arg1);
{
insert_image=DestroyImage(insert_image);
CLIWandExceptArgBreak(OptionError,"NoSuchImage",option,arg1);
}
InsertImageInList(&index_image,insert_image);
}
_images=GetFirstImageInList(index_image);
Expand Down

0 comments on commit 5f21230

Please sign in to comment.