diff options
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/gen/sem.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/gen/sem.c b/lib/libc/gen/sem.c index ec80bc3eab53..64ba05b70b8b 100644 --- a/lib/libc/gen/sem.c +++ b/lib/libc/gen/sem.c @@ -182,8 +182,11 @@ __sem_destroy(sem_t *sem) } _pthread_mutex_unlock(&(*sem)->lock); - if (retval == 0) + if (retval == 0) { + _pthread_mutex_destroy(&(*sem)->lock); + _pthread_cond_destroy(&(*sem)->gtzero); sem_free(*sem); + } return (retval); } |
