summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--condvar.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 336f9d3..d634187 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2001-05-31 Ross Johnson <rpj@setup1.ise.canberra.edu.au>
+
+ * condvar.c (pthread_cond_init): free memory when init fails.
+
2001-05-30 Ross Johnson <rpj@setup1.ise.canberra.edu.au>
* pthread.h (rand_r): Fake using _seed argument to quell
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: