summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2002-10-13 00:58:03 +0000
committerNeal H. Walfield <neal@gnu.org>2002-10-13 00:58:03 +0000
commitb7f80be8ca511ccf92f4488dc34e42712e1f957d (patch)
tree0060942bf3b70893266032061759284e818f3880 /sysdeps
parentb1c60ca6e55ead2fda78550689f588d81bb6c23b (diff)
2002-10-12 Neal H. Walfield <neal@cs.uml.edu>
* sysdeps/hurd/pt-destroy-specific.c (__pthread_destroy_specific): Only call the destructor if there is one set.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/hurd/pt-destroy-specific.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/hurd/pt-destroy-specific.c b/sysdeps/hurd/pt-destroy-specific.c
index 8238222..dbd3314 100644
--- a/sysdeps/hurd/pt-destroy-specific.c
+++ b/sysdeps/hurd/pt-destroy-specific.c
@@ -53,12 +53,14 @@ __pthread_destroy_specific (struct __pthread *thread)
value = ihash_find (thread->thread_specifics, i);
if (value)
{
- seen_one = 1;
-
err = ihash_remove (thread->thread_specifics, i);
assert (err == 1);
- __pthread_key_destructors[i] (value);
+ if (__pthread_key_destructors[i])
+ {
+ seen_one = 1;
+ __pthread_key_destructors[i] (value);
+ }
}
}