diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-07-21 23:33:57 -0400 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2009-08-19 12:28:00 -0700 |
commit | 68da1f7c28f306bc938ec905a6b7b31cf4321d78 (patch) | |
tree | 73e54c1ed5303ef40b760a93d1816b504f8fbb01 /libpthread/linuxthreads.old/join.c | |
parent | c3f6cad8dc35854c21407326cae6e990ba07ab26 (diff) | |
download | uClibc-alpine-68da1f7c28f306bc938ec905a6b7b31cf4321d78.tar.bz2 uClibc-alpine-68da1f7c28f306bc938ec905a6b7b31cf4321d78.tar.xz |
linuxthreads.old: fix crash in debug code
If pthread_join() is called and there is nothing to join, then the debug
code will attempt to dereference a NULL pointer.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libpthread/linuxthreads.old/join.c')
-rw-r--r-- | libpthread/linuxthreads.old/join.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpthread/linuxthreads.old/join.c b/libpthread/linuxthreads.old/join.c index ee3449396..4a7c0d8ac 100644 --- a/libpthread/linuxthreads.old/join.c +++ b/libpthread/linuxthreads.old/join.c @@ -77,7 +77,7 @@ void __pthread_do_exit(void *retval, char *currentframe) THREAD_SETMEM(self, p_terminated, 1); /* See if someone is joining on us */ joining = THREAD_GETMEM(self, p_joining); - PDEBUG("joining = %p, pid=%d\n", joining, joining->p_pid); + PDEBUG("joining = %p, pid=%d\n", joining, joining ? joining->p_pid : 0); __pthread_unlock(THREAD_GETMEM(self, p_lock)); /* Restart joining thread if any */ if (joining != NULL) restart(joining); |