From 8ed990870ef9bedf37299e0a6150e83e8aa78856 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Tue, 9 Jul 2019 21:29:03 +0200 Subject: [PATCH] Renamed variable to avoid possible memory leak. --- coders/tiff.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/coders/tiff.c b/coders/tiff.c index dae8375ef..9bd0c8697 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -2301,7 +2301,7 @@ RestoreMSCWarning default: { MemoryInfo - *pixel_info = (MemoryInfo * ) NULL; + *generic_info = (MemoryInfo * ) NULL; register uint32 *p; @@ -2316,10 +2316,10 @@ RestoreMSCWarning if (HeapOverflowSanityCheck(image->rows,sizeof(*pixels)) != MagickFalse) ThrowTIFFException(ResourceLimitError,"MemoryAllocationFailed"); number_pixels=(MagickSizeType) image->columns*image->rows; - pixel_info=AcquireVirtualMemory(number_pixels,sizeof(uint32)); - if (pixel_info == (MemoryInfo *) NULL) + generic_info=AcquireVirtualMemory(number_pixels,sizeof(uint32)); + if (generic_info == (MemoryInfo *) NULL) ThrowTIFFException(ResourceLimitError,"MemoryAllocationFailed"); - pixels=(uint32 *) GetVirtualMemoryBlob(pixel_info); + pixels=(uint32 *) GetVirtualMemoryBlob(generic_info); (void) TIFFReadRGBAImage(tiff,(uint32) image->columns,(uint32) image->rows,(uint32 *) pixels,0); /* @@ -2362,7 +2362,7 @@ RestoreMSCWarning break; } } - pixel_info=RelinquishVirtualMemory(pixel_info); + generic_info=RelinquishVirtualMemory(generic_info); break; } } -- 2.40.0