From ece953bbe14e8514afc23e05e4030eea872e29da Mon Sep 17 00:00:00 2001 From: Cristy Date: Fri, 24 Nov 2017 09:23:04 -0500 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/878 --- coders/mat.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/coders/mat.c b/coders/mat.c index efe08943a..5e281111c 100644 --- a/coders/mat.c +++ b/coders/mat.c @@ -1053,7 +1053,16 @@ MATLAB_KO: MATLAB_HDR.StructureClass != mxUINT32_CLASS && /* uint32 + uint32 3D */ MATLAB_HDR.StructureClass != mxINT64_CLASS && MATLAB_HDR.StructureClass != mxUINT64_CLASS) /* uint64 + uint64 3D */ - ThrowReaderException(CoderError,"UnsupportedCellTypeInTheMatrix"); + { + if ((image2 != (Image*) NULL) && (image2 != (Image *) image)) + { + CloseBlob(image2); + DeleteImageFromList(&image2); + } + if (clone_info != (ImageInfo *) NULL) + DestroyImageInfo(clone_info); + ThrowReaderException(CoderError,"UnsupportedCellTypeInTheMatrix"); + } switch (MATLAB_HDR.NameFlag) { -- 2.40.0