From c6dcebb9a6b07e13bd51c4943a3b9bf613036c80 Mon Sep 17 00:00:00 2001 From: root <356986351@qq.com> Date: Fri, 15 Sep 2017 17:08:51 +0000 Subject: [PATCH] fix memory leak in dps --- coders/dps.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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: -- 2.40.0