From: Cristy Date: Sat, 10 Feb 2018 13:28:01 +0000 (-0500) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6194 X-Git-Tag: 7.0.7-23~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b73156511247b24800abcd967adca4c8a749aae0;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6194 --- diff --git a/coders/caption.c b/coders/caption.c index 0d8351e2b..57c97fcdb 100644 --- a/coders/caption.c +++ b/coders/caption.c @@ -150,7 +150,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info, property=InterpretImageProperties((ImageInfo *) image_info,image,option, exception); if (property == (char *) NULL) - return((Image *) NULL); + return(DestroyImageList(image)); (void) SetImageProperty(image,"caption",property,exception); property=DestroyString(property); caption=ConstantString(GetImageProperty(image,"caption",exception)); diff --git a/coders/label.c b/coders/label.c index 6fdc1c587..866beb8e2 100644 --- a/coders/label.c +++ b/coders/label.c @@ -127,7 +127,7 @@ static Image *ReadLABELImage(const ImageInfo *image_info, property=InterpretImageProperties((ImageInfo *) image_info,image, image_info->filename,exception); if (property == (char *) NULL) - return((Image *) NULL); + return(DestroyImageList(image)); (void) SetImageProperty(image,"label",property,exception); property=DestroyString(property); label=GetImageProperty(image,"label",exception);