From ad8e8dd6b78de7c6c7fcdff988f371ef4d96c7f5 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 30 Sep 2017 20:33:52 -0400 Subject: [PATCH] ... --- coders/palm.c | 2 ++ 1 file changed, 2 insertions(+) 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"); } -- 2.40.0