{
count=ReadBlob(image,length,pixels);
if (count != (ssize_t) (length))
- ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
+ {
+ pixel_info=RelinquishVirtualMemory(pixel_info);
+ ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
+ }
}
else
{
status=DecodeImage(image,dib_info.compression ? MagickTrue : MagickFalse,
pixels);
if (status == MagickFalse)
- ThrowReaderException(CorruptImageError,"UnableToRunlengthDecodeImage");
+ {
+ pixel_info=RelinquishVirtualMemory(pixel_info);
+ ThrowReaderException(CorruptImageError,
+ "UnableToRunlengthDecodeImage");
+ }
}
/*
Initialize image structure.
break;
}
default:
+ pixel_info=RelinquishVirtualMemory(pixel_info);
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
}
pixel_info=RelinquishVirtualMemory(pixel_info);