diff options
-rw-r--r-- | c/src/exec/posix/src/cond.c | 6 | ||||
-rw-r--r-- | cpukit/posix/src/cond.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/c/src/exec/posix/src/cond.c b/c/src/exec/posix/src/cond.c index e7e03c6e6d..89002876b5 100644 --- a/c/src/exec/posix/src/cond.c +++ b/c/src/exec/posix/src/cond.c @@ -256,14 +256,14 @@ int pthread_cond_destroy( return EINVAL; case OBJECTS_LOCAL: + if ( _Thread_queue_First( &the_cond->Wait_queue ) ) + return EBUSY; + _Objects_Close( &_POSIX_Condition_variables_Information, &the_cond->Object ); - if ( _Thread_queue_First( &the_cond->Wait_queue ) ) - return EBUSY; - _POSIX_Condition_variables_Free( the_cond ); if ( the_cond->process_shared == PTHREAD_PROCESS_SHARED ) { diff --git a/cpukit/posix/src/cond.c b/cpukit/posix/src/cond.c index e7e03c6e6d..89002876b5 100644 --- a/cpukit/posix/src/cond.c +++ b/cpukit/posix/src/cond.c @@ -256,14 +256,14 @@ int pthread_cond_destroy( return EINVAL; case OBJECTS_LOCAL: + if ( _Thread_queue_First( &the_cond->Wait_queue ) ) + return EBUSY; + _Objects_Close( &_POSIX_Condition_variables_Information, &the_cond->Object ); - if ( _Thread_queue_First( &the_cond->Wait_queue ) ) - return EBUSY; - _POSIX_Condition_variables_Free( the_cond ); if ( the_cond->process_shared == PTHREAD_PROCESS_SHARED ) { |