From: Cristy Date: Sun, 1 Oct 2017 00:33:52 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.7-5~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad8e8dd6b78de7c6c7fcdff988f371ef4d96c7f5;p=imagemagick ... --- diff --git a/coders/palm.c b/coders/palm.c index 8a1747093..120c6dd23 100644 --- a/coders/palm.c +++ b/coders/palm.c @@ -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"); }