summaryrefslogtreecommitdiff
path: root/lib/libpthread/uthread
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/uthread')
-rw-r--r--lib/libpthread/uthread/uthread_gc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libpthread/uthread/uthread_gc.c b/lib/libpthread/uthread/uthread_gc.c
index d59708d753d..85fe0590051 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.13 2003/12/23 20:10:45 brad Exp $ */
+/* $OpenBSD: uthread_gc.c,v 1.14 2004/04/06 03:56:39 marc Exp $ */
/*
* Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>
* All rights reserved.
@@ -132,8 +132,10 @@ _thread_gc(pthread_addr_t arg)
* Point to the stack structure that must
* be freed outside the locks:
*/
- if (pthread->stack != NULL)
+ if (pthread->stack != NULL) {
p_stack = pthread->stack;
+ pthread->stack = NULL;
+ }
/*
* Point to the thread structure that must