summaryrefslogtreecommitdiff
path: root/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'sync.c')
-rw-r--r--sync.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sync.c b/sync.c
index 5b4ee9a..b7de5ac 100644
--- a/sync.c
+++ b/sync.c
@@ -123,6 +123,12 @@ pthread_join (pthread_t thread, void **value_ptr)
}
else
{
+ /*
+ * FIXME: This call frees memory used to hold the 'thread'
+ * object. 'thread' will be invalid after the first call.
+ *
+ * Only the last exiting join should free 'thread'.
+ */
_pthread_threadDestroy (thread);
}
}