From: Cristy Date: Sun, 23 Jul 2017 14:40:17 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/599 X-Git-Tag: 7.0.6-3~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac38f521356b576ab57c2e74cc541548d80a8bdc;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/599 --- diff --git a/coders/mat.c b/coders/mat.c index 6b08f765e..14dde7d10 100644 --- a/coders/mat.c +++ b/coders/mat.c @@ -933,7 +933,8 @@ static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception) if (strncmp(MATLAB_HDR.identific, "MATLAB", 6)) { MATLAB_KO: - clone_info=DestroyImageInfo(clone_info); + if (clone_info != (ImageInfo *) NULL) + clone_info=DestroyImageInfo(clone_info); ThrowReaderException(CorruptImageError,"ImproperImageHeader"); }