From: Cristy Date: Sun, 13 May 2018 23:15:05 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.7-32~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f61f674e36afd06c96bcb77134ded8ce54774cc5;p=imagemagick ... --- diff --git a/coders/mat.c b/coders/mat.c index 3af3c7e0e..b11c065db 100644 --- a/coders/mat.c +++ b/coders/mat.c @@ -984,9 +984,13 @@ MATLAB_KO: } #endif - if (MATLAB_HDR.DataType!=miMATRIX) + if (MATLAB_HDR.DataType != miMATRIX) { clone_info=DestroyImageInfo(clone_info); +#if defined(MAGICKCORE_ZLIB_DELEGATE) + if (image2 != image) + DeleteImageFromList(&image2); +#endif continue; /* skip another objects. */ } @@ -1074,7 +1078,7 @@ MATLAB_KO: MATLAB_HDR.StructureClass != mxINT64_CLASS && MATLAB_HDR.StructureClass != mxUINT64_CLASS) /* uint64 + uint64 3D */ { - if ((image2 != (Image*) NULL) && (image2 != (Image *) image)) + if (image2 != (Image*) NULL) { CloseBlob(image2); DeleteImageFromList(&image2);