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 | d11acf233709ad78bcd49474cc940471382a318b (patch) | |
| tree | f232167e1e9b6774c66e455ea8a80486564aca54 /sysdeps/hurd/pt-destroy-specific.c | |
| parent | 1f98f3e86e46d339425b50a8e10fdb62b2278ca3 (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/hurd/pt-destroy-specific.c')
| -rw-r--r-- | sysdeps/hurd/pt-destroy-specific.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/hurd/pt-destroy-specific.c b/sysdeps/hurd/pt-destroy-specific.c index 82382228..dbd3314b 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); + } } } |
