From 0865163bc79ecdf7ed608340017bd36b2c795562 Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 13 Mar 2017 07:50:39 -0400 Subject: [PATCH] ... --- MagickCore/cache.c | 16 +++++++++++----- config/policy.xml | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/MagickCore/cache.c b/MagickCore/cache.c index 7c76cdf03..82fe3b69a 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -190,7 +190,7 @@ MagickPrivate Cache AcquirePixelCache(const size_t number_threads) *magick_restrict cache_info; char - *synchronize; + *value; cache_info=(CacheInfo *) AcquireQuantumMemory(1,sizeof(*cache_info)); if (cache_info == (CacheInfo *) NULL) @@ -211,11 +211,17 @@ MagickPrivate Cache AcquirePixelCache(const size_t number_threads) cache_info->nexus_info=AcquirePixelCacheNexus(cache_info->number_threads); if (cache_info->nexus_info == (NexusInfo **) NULL) ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); - synchronize=GetEnvironmentValue("MAGICK_SYNCHRONIZE"); - if (synchronize != (const char *) NULL) + value=GetEnvironmentValue("MAGICK_SYNCHRONIZE"); + if (value != (const char *) NULL) { - cache_info->synchronize=IsStringTrue(synchronize); - synchronize=DestroyString(synchronize); + cache_info->synchronize=IsStringTrue(value); + value=DestroyString(value); + } + value=GetPolicyValue("synchronize"); + if (value != (const char *) NULL) + { + cache_info->synchronize=IsStringTrue(value); + value=DestroyString(value); } cache_info->semaphore=AcquireSemaphoreInfo(); cache_info->reference_count=1; diff --git a/config/policy.xml b/config/policy.xml index 80e675fdf..b0df62995 100644 --- a/config/policy.xml +++ b/config/policy.xml @@ -65,6 +65,7 @@ + -- 2.40.0