From b64b62d6966d34e8850846fa2a2659a4010a1d21 Mon Sep 17 00:00:00 2001 From: Cristy Date: Fri, 22 Dec 2017 08:46:25 -0500 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/912 --- coders/miff.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/coders/miff.c b/coders/miff.c index 61a51b3f7..4d80075c2 100644 --- a/coders/miff.c +++ b/coders/miff.c @@ -1086,12 +1086,10 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, (image->colorspace == UndefinedColorspace) || (image->columns == 0) || (image->rows == 0)) { + if (profiles != (LinkedListInfo *) NULL) + profiles=DestroyLinkedList(profiles,RelinquishMagickMemory); if (image->previous == (Image *) NULL) - { - if (profiles != (LinkedListInfo *) NULL) - profiles=DestroyLinkedList(profiles,RelinquishMagickMemory); - ThrowReaderException(CorruptImageError,"ImproperImageHeader"); - } + ThrowReaderException(CorruptImageError,"ImproperImageHeader"); DeleteImageFromList(&image); (void) ThrowMagickException(exception,GetMagickModule(), CorruptImageError,"ImproperImageHeader","`%s'",image->filename); -- 2.40.0