aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJose Ruiz <ruiz@adacore.com>2005-11-15 14:52:20 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2005-11-15 14:52:20 +0100
commita7e4a88171b3d27988467de59d6173804c2f8bc4 (patch)
tree24a6c7877f2d25c7f527c443bbb79590966c160c /gcc
parentec09262ef15744e8266f0f064872c678670c5934 (diff)
downloadgcc-a7e4a88171b3d27988467de59d6173804c2f8bc4.zip
gcc-a7e4a88171b3d27988467de59d6173804c2f8bc4.tar.gz
gcc-a7e4a88171b3d27988467de59d6173804c2f8bc4.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/s-taprop-posix.adb1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/s-taprop-posix.adb b/gcc/ada/s-taprop-posix.adb
index 3ad2659..492c070 100644
--- a/gcc/ada/s-taprop-posix.adb
+++ b/gcc/ada/s-taprop-posix.adb
@@ -312,6 +312,7 @@ package body System.Task_Primitives.Operations is
pragma Assert (Result = 0 or else Result = ENOMEM);
if Result = ENOMEM then
+ Result := pthread_mutexattr_destroy (Attributes'Access);
raise Storage_Error;
end if;