File ImageMagick-CVE-2016-7539.patch of Package ImageMagick.8212

--- a/magick/cache.c
+++ b/magick/cache.c
@@ -3371,19 +3371,6 @@ static MagickBooleanType MaskPixelCacheNexus(Image *image,NexusInfo *nexus_info,
 %
 */
 
-static inline void AllocatePixelCachePixels(CacheInfo *cache_info)
-{
-  cache_info->mapped=MagickFalse;
-  cache_info->pixels=(PixelPacket *) MagickAssumeAligned(
-    AcquireAlignedMemory(1,(size_t) cache_info->length));
-  if (cache_info->pixels == (PixelPacket *) NULL)
-    {
-      cache_info->mapped=MagickTrue;
-      cache_info->pixels=(PixelPacket *) MapBlob(-1,IOMode,0,(size_t)
-        cache_info->length);
-    }
-}
-
 #if defined(__cplusplus) || defined(c_plusplus)
 extern "C" {
 #endif
@@ -3603,7 +3590,9 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode,
       if (((cache_info->type == UndefinedCache) && (status != MagickFalse)) ||
           (cache_info->type == MemoryCache))
         {
-          AllocatePixelCachePixels(cache_info);
+          cache_info->mapped=MagickFalse;
+          cache_info->pixels=(PixelPacket *) MagickAssumeAligned(
+            AcquireAlignedMemory(1,(size_t) cache_info->length));
           if (cache_info->pixels == (PixelPacket *) NULL)
             cache_info->pixels=source_info.pixels;
           else