From 74f8b6cb2d31651cd34d2830f570979f7db882e0 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 24 Mar 2018 12:44:43 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1050 --- coders/pdb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coders/pdb.c b/coders/pdb.c index 52ba27997..b020a8d6b 100644 --- a/coders/pdb.c +++ b/coders/pdb.c @@ -868,7 +868,10 @@ static MagickBooleanType WritePDBImage(const ImageInfo *image_info,Image *image, */ quantum_info=AcquireQuantumInfo(image_info,image); if (quantum_info == (QuantumInfo *) NULL) - ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); + { + runlength=(unsigned char *) RelinquishMagickMemory(runlength); + ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); + } status=SetQuantumDepth(image,quantum_info,image->depth > 8 ? 16 : 8); bits=8/(int) bits_per_pixel-1; /* start at most significant bits */ literal=0; -- 2.40.0