From 962282327f3a28ffb1138f3ad3fb0438b57ae6b1 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Mon, 17 Apr 2017 18:52:04 +0200 Subject: [PATCH] Fixed memory leak reported in #429. --- coders/avs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.50.1