Skip to content

Commit 3b0fe05

Browse files
author
Dirk Lemstra
committed
Fixed memory leak reported in #456.
1 parent 3690a82 commit 3b0fe05

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: coders/art.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ static Image *ReadARTImage(const ImageInfo *image_info,ExceptionInfo *exception)
168168
pixels=(const unsigned char *) ReadBlobStream(image,length,
169169
GetQuantumPixels(quantum_info),&count);
170170
if (count != (ssize_t) length)
171-
ThrowReaderException(CorruptImageError,"UnableToReadImageData");
171+
{
172+
quantum_info=DestroyQuantumInfo(quantum_info);
173+
ThrowReaderException(CorruptImageError,"UnableToReadImageData");
174+
}
172175
(void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
173176
GrayQuantum,pixels,exception);
174177
pixels=(const unsigned char *) ReadBlobStream(image,(size_t) (-(ssize_t)

0 commit comments

Comments
 (0)