]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/memory.c
(no commit message)
[imagemagick] / MagickCore / memory.c
index 0590f8ba910e429074887fe25c80141a47205397..05e674fc1bc499c3460db2d59ac1af90775a03fc 100644 (file)
@@ -17,7 +17,7 @@
 %                                 July 1998                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -753,9 +753,9 @@ MagickExport void *RelinquishMagickMemory(void *memory)
 #if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
   memory_methods.destroy_memory_handler(memory);
 #else
+  LockSemaphoreInfo(memory_semaphore);
   assert((SizeOfBlock(memory) % (4*sizeof(size_t))) == 0);
   assert((*BlockHeader(NextBlock(memory)) & PreviousBlockBit) != 0);
-  LockSemaphoreInfo(memory_semaphore);
   if ((*BlockHeader(memory) & PreviousBlockBit) == 0)
     {
       void