From: cristy Date: Wed, 17 Jul 2013 11:38:57 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~3497 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5292baa905de5dbfa377409d21853f622cd2c1c;p=imagemagick --- diff --git a/MagickCore/memory.c b/MagickCore/memory.c index 126b9087f..5316ba79b 100644 --- a/MagickCore/memory.c +++ b/MagickCore/memory.c @@ -592,11 +592,10 @@ MagickExport MemoryInfo *AcquireVirtualMemory(const size_t count, { if ((lseek(file,length-1,SEEK_SET) >= 0) && (write(file,"",1) == 1)) { - (void) AcquireMagickResource(MapResource,length); memory_info->mapped=MagickTrue; memory_info->blob=MapBlob(file,IOMode,0,length); - if (memory_info->blob == NULL) - RelinquishMagickResource(MapResource,length); + if (memory_info->blob != NULL) + (void) AcquireMagickResource(MapResource,length); } (void) close(file); }