From: Cristy Date: Fri, 15 Sep 2017 10:10:12 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/759 X-Git-Tag: 7.0.7-3~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8fa3c10977f668c92688272a4802f4477df61076;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/759 --- diff --git a/coders/sgi.c b/coders/sgi.c index dfd2db923..83e4dd348 100644 --- a/coders/sgi.c +++ b/coders/sgi.c @@ -647,7 +647,10 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception) Create grayscale map. */ if (AcquireImageColormap(image,image->colors,exception) == MagickFalse) - ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); + { + pixel_info=RelinquishVirtualMemory(pixel_info); + ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); + } /* Convert SGI image to PseudoClass pixel packets. */