From: Cristy Date: Wed, 9 Aug 2017 12:01:38 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/662 X-Git-Tag: 7.0.6-6~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04178de2247e353fc095846784b9a10fefdbf890;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/662 --- diff --git a/coders/mat.c b/coders/mat.c index e3b80f14b..fc8da2b14 100644 --- a/coders/mat.c +++ b/coders/mat.c @@ -1330,8 +1330,6 @@ done_reading: if (quantum_info != (QuantumInfo *) NULL) quantum_info=DestroyQuantumInfo(quantum_info); END_OF_READING: - if (clone_info) - clone_info=DestroyImageInfo(clone_info); CloseBlob(image); @@ -1349,6 +1347,8 @@ END_OF_READING: Image *tmp=p; if ((p->rows == 0) || (p->columns == 0)) { p=p->previous; + if (tmp == image2) + image2=(Image *) NULL; DeleteImageFromList(&tmp); } else { image=p;