summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1999-11-30 04:59:43 +0000
committerDavid Leonard <d@cvs.openbsd.org>1999-11-30 04:59:43 +0000
commit63063f0e203f5e95025ae4b94a47dce3512be78a (patch)
treea09ce3271a9a89bcb156341f21137be7eae27c06
parenta1dc0e6eac314bd318ac1923a911c94443d27589 (diff)
garbage collect thread-specific data
-rw-r--r--lib/libc_r/uthread/uthread_gc.c5
-rw-r--r--lib/libpthread/uthread/uthread_gc.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/libc_r/uthread/uthread_gc.c b/lib/libc_r/uthread/uthread_gc.c
index 31975b68621..af78d0f6f98 100644
--- a/lib/libc_r/uthread/uthread_gc.c
+++ b/lib/libc_r/uthread/uthread_gc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_gc.c,v 1.7 1999/11/30 04:53:24 d Exp $ */
+/* $OpenBSD: uthread_gc.c,v 1.8 1999/11/30 04:59:42 d Exp $ */
/*
* Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>
* All rights reserved.
@@ -203,6 +203,9 @@ _thread_gc(pthread_addr_t arg)
if (pthread_cln->poll_data.fds != NULL)
free(pthread_cln->poll_data.fds);
+ if (pthread_cln->specific_data != NULL)
+ free(pthread_cln->specific_data);
+
free(pthread_cln);
}
}
diff --git a/lib/libpthread/uthread/uthread_gc.c b/lib/libpthread/uthread/uthread_gc.c
index 31975b68621..af78d0f6f98 100644
--- a/lib/libpthread/uthread/uthread_gc.c
+++ b/lib/libpthread/uthread/uthread_gc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_gc.c,v 1.7 1999/11/30 04:53:24 d Exp $ */
+/* $OpenBSD: uthread_gc.c,v 1.8 1999/11/30 04:59:42 d Exp $ */
/*
* Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>
* All rights reserved.
@@ -203,6 +203,9 @@ _thread_gc(pthread_addr_t arg)
if (pthread_cln->poll_data.fds != NULL)
free(pthread_cln->poll_data.fds);
+ if (pthread_cln->specific_data != NULL)
+ free(pthread_cln->specific_data);
+
free(pthread_cln);
}
}