From c0fe488e7052f68d4eb7768805a857ef6fef928d Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 23 Mar 2019 14:36:09 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1520 --- coders/pcl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/coders/pcl.c b/coders/pcl.c index 5c057be80..5a6fc7dce 100644 --- a/coders/pcl.c +++ b/coders/pcl.c @@ -319,7 +319,10 @@ static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception) else delegate_info=GetDelegateInfo("pcl:color",(char *) NULL,exception); if (delegate_info == (const DelegateInfo *) NULL) - return((Image *) NULL); + { + image=DestroyImage(image); + return((Image *) NULL); + } if ((page.width == 0) || (page.height == 0)) (void) ParseAbsoluteGeometry(PSPageGeometry,&page); if (image_info->page != (char *) NULL) @@ -331,7 +334,7 @@ static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception) page.width=(size_t) floor(page.width*image->resolution.x/delta.x+0.5); page.height=(size_t) floor(page.height*image->resolution.y/delta.y+0.5); (void) FormatLocaleString(options,MagickPathExtent,"-g%.20gx%.20g ",(double) - page.width,(double) page.height); + page.width,(double) page.height); image=DestroyImage(image); read_info=CloneImageInfo(image_info); *read_info->magick='\0'; -- 2.40.0