From: Dirk Lemstra Date: Tue, 2 May 2017 06:32:29 +0000 (+0200) Subject: Fixed memory leak reported in #456. X-Git-Tag: 7.0.5-6~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b0fe05cddd8910f84e51b4d50099702ea45ba4a;p=imagemagick Fixed memory leak reported in #456. --- diff --git a/coders/art.c b/coders/art.c index b54cde492..f96083245 100644 --- a/coders/art.c +++ b/coders/art.c @@ -168,7 +168,10 @@ static Image *ReadARTImage(const ImageInfo *image_info,ExceptionInfo *exception) pixels=(const unsigned char *) ReadBlobStream(image,length, GetQuantumPixels(quantum_info),&count); if (count != (ssize_t) length) - ThrowReaderException(CorruptImageError,"UnableToReadImageData"); + { + quantum_info=DestroyQuantumInfo(quantum_info); + ThrowReaderException(CorruptImageError,"UnableToReadImageData"); + } (void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info, GrayQuantum,pixels,exception); pixels=(const unsigned char *) ReadBlobStream(image,(size_t) (-(ssize_t)