From: Dirk Lemstra Date: Mon, 17 Apr 2017 16:52:04 +0000 (+0200) Subject: Fixed memory leak reported in #429. X-Git-Tag: 7.0.5-5~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=962282327f3a28ffb1138f3ad3fb0438b57ae6b1;p=imagemagick Fixed memory leak reported in #429. --- diff --git a/coders/avs.c b/coders/avs.c index 8d44ba68a..06c9eb146 100644 --- a/coders/avs.c +++ b/coders/avs.c @@ -173,7 +173,10 @@ static Image *ReadAVSImage(const ImageInfo *image_info,ExceptionInfo *exception) { count=ReadBlob(image,length,pixels); if ((size_t) count != length) - ThrowReaderException(CorruptImageError,"UnableToReadImageData"); + { + pixel_info=RelinquishVirtualMemory(pixel_info); + ThrowReaderException(CorruptImageError,"UnableToReadImageData"); + } p=pixels; q=QueueAuthenticPixels(image,0,y,image->columns,1,exception); if (q == (Quantum *) NULL)