]> granicus.if.org Git - imagemagick/commitdiff
Call AcquireAlignedMemory because the free method expects aligned memory.
authordirk <dirk@git.imagemagick.org>
Mon, 14 Dec 2015 21:41:22 +0000 (22:41 +0100)
committerdirk <dirk@git.imagemagick.org>
Mon, 14 Dec 2015 21:41:22 +0000 (22:41 +0100)
MagickCore/pixel.c

index f5a94db0b85eebc98414ea61bea9a25f35d2fd5c..0805f6c7541e43c71a5b5c1a0a768e24964a29ff 100644 (file)
@@ -56,6 +56,7 @@
 #include "MagickCore/list.h"
 #include "MagickCore/magick.h"
 #include "MagickCore/memory_.h"
+#include "MagickCore/memory-private.h"
 #include "MagickCore/monitor.h"
 #include "MagickCore/option.h"
 #include "MagickCore/pixel.h"
@@ -171,7 +172,8 @@ MagickExport PixelInfo *ClonePixelInfo(const PixelInfo *pixel)
   PixelInfo
     *pixel_info;
 
-  pixel_info=(PixelInfo *) AcquireQuantumMemory(1,sizeof(*pixel_info));
+  pixel_info=(PixelInfo *) MagickAssumeAligned(AcquireAlignedMemory(1,
+    sizeof(*pixel_info)));
   if (pixel_info == (PixelInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   *pixel_info=(*pixel);