From b73156511247b24800abcd967adca4c8a749aae0 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 10 Feb 2018 08:28:01 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6194 --- coders/caption.c | 2 +- coders/label.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); -- 2.40.0