]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Fri, 3 Nov 2017 00:34:47 +0000 (20:34 -0400)
committerCristy <urban-warrior@imagemagick.org>
Fri, 3 Nov 2017 00:34:47 +0000 (20:34 -0400)
MagickCore/image.c

index 45906bd572e6ef548b84359db3e5df6151e08752..694c4f5729318e86ba7d1c5b557d6c4048eb7d1c 100644 (file)
@@ -823,9 +823,7 @@ MagickExport Image *CloneImage(const Image *image,const size_t columns,
         "NegativeOrZeroImageSize","`%s'",image->filename);
       return((Image *) NULL);
     }
-  clone_image=(Image *) AcquireMagickMemory(sizeof(*clone_image));
-  if (clone_image == (Image *) NULL)
-    ThrowImageException(ResourceLimitError,"MemoryAllocationFailed");
+  clone_image=(Image *) AcquireCriticalMemory(sizeof(*clone_image));
   (void) ResetMagickMemory(clone_image,0,sizeof(*clone_image));
   clone_image->signature=MagickCoreSignature;
   clone_image->storage_class=image->storage_class;