From: Dirk Lemstra Date: Sun, 11 Mar 2018 07:58:48 +0000 (+0100) Subject: The image should be destroyed to avoid a memory leak. X-Git-Tag: 7.0.7-26~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e820a26b5dd5908a8126c67212c3ceff983a52ea;p=imagemagick The image should be destroyed to avoid a memory leak. --- diff --git a/coders/wpg.c b/coders/wpg.c index 54fa63315..d179f7e49 100644 --- a/coders/wpg.c +++ b/coders/wpg.c @@ -864,7 +864,7 @@ static Image *ExtractPostscript(Image *image,const ImageInfo *image_info, FINISH: DestroyImageInfo(clone_info); if (status == MagickFalse) - return((Image *) NULL); + return(DestroyImageList(image)); return(image); }