summaryrefslogtreecommitdiff
path: root/condvar.c
diff options
context:
space:
mode:
authorrpj <rpj>2001-05-31 06:13:49 +0000
committerrpj <rpj>2001-05-31 06:13:49 +0000
commit860ecc4c24475dc3d3efe0adc981071f2aaf1299 (patch)
treee447d4cf4fae9c73a16573e92a5e7577b6885102 /condvar.c
parenta8744086b476e4007c1d8fc0fae84ecfcade99ba (diff)
* condvar.c (pthread_cond_init): free memory when init fails.
Diffstat (limited to 'condvar.c')
-rw-r--r--condvar.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/condvar.c b/condvar.c
index a92fdfb..afc6eea 100644
--- a/condvar.c
+++ b/condvar.c
@@ -414,6 +414,8 @@ FAIL2:
FAIL1:
(void) sem_destroy (&(cv->sema));
+ free(cv);
+ cv = NULL;
FAIL0:
DONE: