summaryrefslogtreecommitdiff
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
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.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/hurd/pt-destroy-specific.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bc70261..3f993d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2002-10-10 Neal H. Walfield <neal@cs.uml.edu>
* libpthread.a: It is _cthread_init_routine, not _cthread_init.
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);
+ }
}
}