From: Cristy Date: Tue, 15 Aug 2017 11:51:23 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/676 X-Git-Tag: 7.0.6-8~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a26d35af096de6cda7988276cd5307f9d21c5bca;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/676 --- diff --git a/coders/miff.c b/coders/miff.c index 8b2e2e321..7e019a00a 100644 --- a/coders/miff.c +++ b/coders/miff.c @@ -1087,7 +1087,11 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, (image->columns == 0) || (image->rows == 0)) { if (image->previous == (Image *) NULL) - ThrowReaderException(CorruptImageError,"ImproperImageHeader"); + { + if (profiles != (LinkedListInfo *) NULL) + profiles=DestroyLinkedList(profiles,RelinquishMagickMemory); + ThrowReaderException(CorruptImageError,"ImproperImageHeader"); + } DeleteImageFromList(&image); (void) ThrowMagickException(exception,GetMagickModule(), CorruptImageError,"ImproperImageHeader","`%s'",image->filename);