diff options
Diffstat (limited to 'lib/libc_r')
-rw-r--r-- | lib/libc_r/uthread/uthread_exit.c | 9 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_gc.c | 6 |
2 files changed, 7 insertions, 8 deletions
diff --git a/lib/libc_r/uthread/uthread_exit.c b/lib/libc_r/uthread/uthread_exit.c index 976ccbbf46d..19780a3e29c 100644 --- a/lib/libc_r/uthread/uthread_exit.c +++ b/lib/libc_r/uthread/uthread_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_exit.c,v 1.10 1999/11/25 07:01:34 d Exp $ */ +/* $OpenBSD: uthread_exit.c,v 1.11 1999/11/30 04:53:24 d Exp $ */ /* * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au> * All rights reserved. @@ -133,12 +133,6 @@ pthread_exit(void *status) PANIC("Thread has called pthread_exit() from a destructor. POSIX 1003.1 1996 s16.2.5.2 does not allow this!"); } - /* Free thread-specific poll_data structure, if allocated */ - if (_thread_run->poll_data.fds != NULL) { - free(_thread_run->poll_data.fds); - _thread_run->poll_data.fds = NULL; - } - /* Flag this thread as exiting: */ _thread_run->flags |= PTHREAD_EXITING; @@ -152,6 +146,7 @@ pthread_exit(void *status) if (_thread_run->attr.cleanup_attr != NULL) { _thread_run->attr.cleanup_attr(_thread_run->attr.arg_attr); } + /* Check if there is thread specific data: */ if (_thread_run->specific_data != NULL) { /* Run the thread-specific data destructors: */ diff --git a/lib/libc_r/uthread/uthread_gc.c b/lib/libc_r/uthread/uthread_gc.c index d97b602687c..31975b68621 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.6 1999/11/25 07:01:36 d Exp $ */ +/* $OpenBSD: uthread_gc.c,v 1.7 1999/11/30 04:53:24 d Exp $ */ /* * Copyright (c) 1998 John Birrell <jb@cimlogic.com.au> * All rights reserved. @@ -199,6 +199,10 @@ _thread_gc(pthread_addr_t arg) */ if (pthread_cln->name != NULL) free(pthread_cln->name); + + if (pthread_cln->poll_data.fds != NULL) + free(pthread_cln->poll_data.fds); + free(pthread_cln); } } |