Skip to content

Commit

Permalink
Fixed memory leak reported in #456.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed May 2, 2017
1 parent 6c6abed commit 7b8c1df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion coders/art.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,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,
quantum_type,pixels,exception);
(void) ReadBlobStream(image,(size_t) (-(ssize_t) length) & 0x01,
Expand Down

0 comments on commit 7b8c1df

Please sign in to comment.