File ImageMagick-CVE-2018-17965.patch of Package ImageMagick.29977
diff --git a/coders/sgi.c b/coders/sgi.c
index a17f7f9a2e..b334cb01ca 100644
--- a/coders/sgi.c
+++ b/coders/sgi.c
@@ -1129,6 +1129,7 @@ static MagickBooleanType WriteSGIImage(const ImageInfo *image_info,Image *image,
runlength=(size_t *) RelinquishMagickMemory(runlength);
if (packet_info != (MemoryInfo *) NULL)
packet_info=RelinquishVirtualMemory(packet_info);
+ pixel_info=RelinquishVirtualMemory(pixel_info);
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
}
packets=(unsigned char *) GetVirtualMemoryBlob(packet_info);