diff options
Diffstat (limited to 'cpukit/posix/src/keydelete.c')
-rw-r--r-- | cpukit/posix/src/keydelete.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cpukit/posix/src/keydelete.c b/cpukit/posix/src/keydelete.c index cd2b39802d..392558f0f8 100644 --- a/cpukit/posix/src/keydelete.c +++ b/cpukit/posix/src/keydelete.c @@ -38,6 +38,7 @@ int pthread_key_delete( POSIX_Keys_Control *the_key; Objects_Locations location; + _Objects_Allocator_lock(); the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { @@ -50,6 +51,7 @@ int pthread_key_delete( */ _POSIX_Keys_Free( the_key ); _Objects_Put(&the_key->Object); + _Objects_Allocator_unlock(); return 0; #if defined(RTEMS_MULTIPROCESSING) @@ -59,5 +61,7 @@ int pthread_key_delete( break; } + _Objects_Allocator_unlock(); + return EINVAL; } |