diff options
-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); + } } } |