From: Dirk Lemstra Date: Thu, 18 Jan 2018 20:05:31 +0000 (+0100) Subject: Fixed memory leak. X-Git-Tag: 7.0.7-22~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c2ec72d3a037cbefc86e0372411cf9f2429d6161;p=imagemagick Fixed memory leak. Credit to OSS-Fuzz --- diff --git a/MagickCore/compress.c b/MagickCore/compress.c index 33160220f..5f4bd8117 100644 --- a/MagickCore/compress.c +++ b/MagickCore/compress.c @@ -460,9 +460,9 @@ MagickExport MagickBooleanType HuffmanDecodeImage(Image *image, (scanline == (unsigned char *) NULL)) { if (mb_hash != (HuffmanTable **) NULL) - mw_hash=(HuffmanTable **) RelinquishMagickMemory(mw_hash); - if (mw_hash != (HuffmanTable **) NULL) mb_hash=(HuffmanTable **) RelinquishMagickMemory(mb_hash); + if (mw_hash != (HuffmanTable **) NULL) + mw_hash=(HuffmanTable **) RelinquishMagickMemory(mw_hash); if (scanline != (unsigned char *) NULL) scanline=(unsigned char *) RelinquishMagickMemory(scanline); ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",