summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/semdestroy.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/semdestroy.c')
-rw-r--r--cpukit/posix/src/semdestroy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/posix/src/semdestroy.c b/cpukit/posix/src/semdestroy.c
index 14ba520fa3..cef340620a 100644
--- a/cpukit/posix/src/semdestroy.c
+++ b/cpukit/posix/src/semdestroy.c
@@ -48,12 +48,12 @@ int sem_destroy(
*/
if ( the_semaphore->named == true ) {
- _Thread_Enable_dispatch();
+ _Objects_Put( &the_semaphore->Object );
rtems_set_errno_and_return_minus_one( EINVAL );
}
_POSIX_Semaphore_Delete( the_semaphore );
- _Thread_Enable_dispatch();
+ _Objects_Put( &the_semaphore->Object );
return 0;
#if defined(RTEMS_MULTIPROCESSING)