From 9f95e186df8190d8539ca5d41e0e252c980724ec Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 30 Sep 2017 09:56:36 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/798 --- MagickCore/opencl.c | 2 +- MagickCore/segment.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MagickCore/opencl.c b/MagickCore/opencl.c index 9bd262902..b913d6679 100644 --- a/MagickCore/opencl.c +++ b/MagickCore/opencl.c @@ -2333,7 +2333,7 @@ static void LoadOpenCLDevices(MagickCLEnv clEnv) openCL_library->clGetDeviceInfo(devices[j],CL_DRIVER_VERSION,0,NULL, &length); - device->version=AcquireQuantumMemory(length,sizeof(*device->version)); + device->version=AcquireCriticalMemory(length*sizeof(*device->version)); openCL_library->clGetDeviceInfo(devices[j],CL_DRIVER_VERSION,length, device->version,NULL); diff --git a/MagickCore/segment.c b/MagickCore/segment.c index 7bb25dba3..e47d0cd4b 100644 --- a/MagickCore/segment.c +++ b/MagickCore/segment.c @@ -1364,7 +1364,7 @@ static IntervalTree *InitializeIntervalTree(const ZeroCrossing *zero_crossing, /* The root is the entire histogram. */ - root=(IntervalTree *) AcquireMagickMemory(sizeof(*root)); + root=(IntervalTree *) AcquireCriticalMemory(sizeof(*root)); root->child=(IntervalTree *) NULL; root->sibling=(IntervalTree *) NULL; root->tau=0.0; -- 2.40.0