]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/exception.c
(no commit message)
[imagemagick] / MagickCore / exception.c
index de9816a6e43c04ebc93795e03c359e1773a9bcb8..3929ba6e3800d26fc7d0affba10776e712a50cc7 100644 (file)
@@ -258,8 +258,8 @@ MagickExport ExceptionInfo *CloneExceptionInfo(ExceptionInfo *exception)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   GetExceptionInfo(clone_exception);
   InheritException(clone_exception,exception);
-  exception->relinquish=MagickTrue;
-  return(exception);
+  clone_exception->relinquish=MagickTrue;
+  return(clone_exception);
 }
 \f
 /*
@@ -414,7 +414,7 @@ MagickExport ExceptionInfo *DestroyExceptionInfo(ExceptionInfo *exception)
   assert(exception != (ExceptionInfo *) NULL);
   assert(exception->signature == MagickSignature);
   if (exception->semaphore == (SemaphoreInfo *) NULL)
-    AcquireSemaphoreInfo(&exception->semaphore);
+    ActivateSemaphoreInfo(&exception->semaphore);
   LockSemaphoreInfo(exception->semaphore);
   exception->severity=UndefinedException;
   if (exception->exceptions != (void *) NULL)
@@ -424,7 +424,7 @@ MagickExport ExceptionInfo *DestroyExceptionInfo(ExceptionInfo *exception)
   if (exception->relinquish != MagickFalse)
     exception->signature=(~MagickSignature);
   UnlockSemaphoreInfo(exception->semaphore);
-  DestroySemaphoreInfo(&exception->semaphore);
+  RelinquishSemaphoreInfo(&exception->semaphore);
   if (relinquish != MagickFalse)
     exception=(ExceptionInfo *) RelinquishMagickMemory(exception);
   return(exception);
@@ -458,7 +458,7 @@ MagickExport void GetExceptionInfo(ExceptionInfo *exception)
   (void) ResetMagickMemory(exception,0,sizeof(*exception));
   exception->severity=UndefinedException;
   exception->exceptions=(void *) NewLinkedList(0);
-  exception->semaphore=AllocateSemaphoreInfo();
+  exception->semaphore=AcquireSemaphoreInfo();
   exception->signature=MagickSignature;
 }
 \f