Commit a7e4a881 by Jose Ruiz Committed by Arnaud Charlet

s-taprop-posix.adb (Initialize_Lock): Destroy mutex attribute before raising the…

s-taprop-posix.adb (Initialize_Lock): Destroy mutex attribute before raising the exception so the memory used is freed.

2005-11-14  Jose Ruiz  <ruiz@adacore.com>

	* s-taprop-posix.adb (Initialize_Lock): Destroy mutex attribute before
	raising the exception so the memory used is freed.

From-SVN: r106956
parent ec09262e
...@@ -312,6 +312,7 @@ package body System.Task_Primitives.Operations is ...@@ -312,6 +312,7 @@ package body System.Task_Primitives.Operations is
pragma Assert (Result = 0 or else Result = ENOMEM); pragma Assert (Result = 0 or else Result = ENOMEM);
if Result = ENOMEM then if Result = ENOMEM then
Result := pthread_mutexattr_destroy (Attributes'Access);
raise Storage_Error; raise Storage_Error;
end if; end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment