diff options
| author | David Xu <davidxu@FreeBSD.org> | 2003-06-03 02:21:01 +0000 |
|---|---|---|
| committer | David Xu <davidxu@FreeBSD.org> | 2003-06-03 02:21:01 +0000 |
| commit | a4c69f224b66d5c96c6cc963c57ceb652dd454d8 (patch) | |
| tree | fee3eb614ec5a89673b553f6647bedd0be160e28 /lib/libpthread/thread/thr_mutex.c | |
| parent | 795d7dc093eaa88fc1768fa1970ff0fefcde2e80 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_mutex.c')
| -rw-r--r-- | lib/libpthread/thread/thr_mutex.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_mutex.c b/lib/libpthread/thread/thr_mutex.c index 2df59efee68d..8d0d76c01b5d 100644 --- a/lib/libpthread/thread/thr_mutex.c +++ b/lib/libpthread/thread/thr_mutex.c @@ -187,6 +187,8 @@ _pthread_mutex_init(pthread_mutex_t *mutex, MUTEX_INIT_LINK(pmutex); *mutex = pmutex; } else { + /* Free the mutex lock structure: */ + _lock_destroy(&pmutex->m_lock); free(pmutex); *mutex = NULL; } @@ -235,6 +237,10 @@ _pthread_mutex_destroy(pthread_mutex_t *mutex) * structure: */ MUTEX_ASSERT_NOT_OWNED(m); + + /* Free the mutex lock structure: */ + _lock_destroy(&m->m_lock); + free(m); } } |
