Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fixed memory leak reported in #456.
  • Loading branch information
dlemstra committed May 2, 2017
1 parent 3690a82 commit 3b0fe05
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion coders/art.c
Expand Up @@ -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)
Expand Down

0 comments on commit 3b0fe05

Please sign in to comment.