]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Sun, 1 Oct 2017 00:33:52 +0000 (20:33 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 1 Oct 2017 00:33:52 +0000 (20:33 -0400)
coders/palm.c

index 8a1747093116e4ec4052b254e11f3a30eec60ddd..120c6dd2312e99f13c9ddd09d224d9aa37110a1f 100644 (file)
@@ -879,6 +879,8 @@ static MagickBooleanType WritePALMImage(const ImageInfo *image_info,
       sizeof(*one_row));
     if (one_row == (unsigned char *) NULL)
       {
+        if (last_row != (unsigned char *) NULL) 
+          last_row=(unsigned char *) RelinquishMagickMemory(last_row);
         quantize_info=DestroyQuantizeInfo(quantize_info);
         ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
       }