summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_cond.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-06-03 02:21:01 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-06-03 02:21:01 +0000
commitddbadd783dbd30ec2511dad26ab3466cf7ec4c01 (patch)
treefee3eb614ec5a89673b553f6647bedd0be160e28 /lib/libpthread/thread/thr_cond.c
parentbf60ecbfb2d83cf558792c69ac18ac88f921df71 (diff)
downloadFreeBSD-src-ddbadd783dbd30ec2511dad26ab3466cf7ec4c01.zip
FreeBSD-src-ddbadd783dbd30ec2511dad26ab3466cf7ec4c01.tar.gz
Free memory of internal low level lock when mutex and condition variable
are destroyed. Submitted by: tegge
Diffstat (limited to 'lib/libpthread/thread/thr_cond.c')
-rw-r--r--lib/libpthread/thread/thr_cond.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_cond.c b/lib/libpthread/thread/thr_cond.c
index 8bf49bc..b352ba3 100644
--- a/lib/libpthread/thread/thr_cond.c
+++ b/lib/libpthread/thread/thr_cond.c
@@ -152,6 +152,9 @@ _pthread_cond_destroy(pthread_cond_t *cond)
/* Unlock the condition variable structure: */
THR_LOCK_RELEASE(curthread, &cv->c_lock);
+ /* Free the cond lock structure: */
+ _lock_destroy(&cv->c_lock);
+
/*
* Free the memory allocated for the condition
* variable structure:
OpenPOWER on IntegriCloud