From: root <356986351@qq.com> Date: Fri, 15 Sep 2017 17:08:51 +0000 (+0000) Subject: fix memory leak in dps X-Git-Tag: 7.0.7-3~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c6dcebb9a6b07e13bd51c4943a3b9bf613036c80;p=imagemagick fix memory leak in dps --- diff --git a/coders/dps.c b/coders/dps.c index f9b02cb63..e4430beb3 100644 --- a/coders/dps.c +++ b/coders/dps.c @@ -315,11 +315,15 @@ static Image *ReadDPSImage(const ImageInfo *image_info,ExceptionInfo *exception) if (image_info->ping != MagickFalse) { (void) CloseBlob(image); + colors=(XColor *) RelinquishMagickMemory(colors); return(GetFirstImageInList(image)); } status=SetImageExtent(image,image->columns,image->rows,exception); if (status == MagickFalse) - return(DestroyImageList(image)); + { + colors=(XColor *) RelinquishMagickMemory(colors); + return(DestroyImageList(image)); + } switch (image->storage_class) { case DirectClass: