diff options
Diffstat (limited to 'lib/libpthread/uthread/uthread_spec.c')
-rw-r--r-- | lib/libpthread/uthread/uthread_spec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpthread/uthread/uthread_spec.c b/lib/libpthread/uthread/uthread_spec.c index 1fe789e6201..c5783331063 100644 --- a/lib/libpthread/uthread/uthread_spec.c +++ b/lib/libpthread/uthread/uthread_spec.c @@ -95,10 +95,10 @@ _thread_cleanupspecific(void) for (itr = 0; itr < PTHREAD_DESTRUCTOR_ITERATIONS; itr++) { for (key = 0; key < PTHREAD_KEYS_MAX; key++) { if (_thread_run->specific_data_count) { - destructor = data = NULL; - /* Lock the key table entry: */ _SPINLOCK(&key_table[key].lock); + destructor = data = NULL; + if (key_table[key].allocated) { if (_thread_run->specific_data[key]) { data = (void *) _thread_run->specific_data[key]; |