diff options
author | Marco S Hyman <marc@cvs.openbsd.org> | 2004-04-06 03:56:40 +0000 |
---|---|---|
committer | Marco S Hyman <marc@cvs.openbsd.org> | 2004-04-06 03:56:40 +0000 |
commit | 230fb0d838f66a634ea47baba3aafe08f9decdcc (patch) | |
tree | 7cf6045877fc7c311d9c995271071657cd4aa5a1 /lib/libpthread/uthread | |
parent | 7659e7c21e0c15158b3b2385ba3bfcd3361966a7 (diff) |
Apply patch from guenther at mho.com (pr3730) that fixes a double
free in the threads library
Diffstat (limited to 'lib/libpthread/uthread')
-rw-r--r-- | lib/libpthread/uthread/uthread_gc.c | 6 |
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 |