diff options
author | Neal H. Walfield <neal@gnu.org> | 2002-10-13 00:58:03 +0000 |
---|---|---|
committer | Neal H. Walfield <neal@gnu.org> | 2002-10-13 00:58:03 +0000 |
commit | b7f80be8ca511ccf92f4488dc34e42712e1f957d (patch) | |
tree | 0060942bf3b70893266032061759284e818f3880 | |
parent | b1c60ca6e55ead2fda78550689f588d81bb6c23b (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-- | ChangeLog | 5 | ||||
-rw-r--r-- | sysdeps/hurd/pt-destroy-specific.c | 8 |
2 files changed, 10 insertions, 3 deletions
@@ -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); + } } } |