From ac38f521356b576ab57c2e74cc541548d80a8bdc Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 23 Jul 2017 10:40:17 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/599 --- coders/mat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"); } -- 2.40.0