summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/thread/thr_kern.c')
-rw-r--r--lib/libpthread/thread/thr_kern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c
index 926ca4b..ac8bf5a 100644
--- a/lib/libpthread/thread/thr_kern.c
+++ b/lib/libpthread/thread/thr_kern.c
@@ -2382,7 +2382,7 @@ _thr_alloc(struct pthread *curthread)
if ((thread == NULL) &&
((thread = malloc(sizeof(struct pthread))) != NULL)) {
bzero(thread, sizeof(struct pthread));
- if ((thread->tcb = _tcb_ctor(thread)) == NULL) {
+ if ((thread->tcb = _tcb_ctor(thread, curthread == NULL)) == NULL) {
free(thread);
thread = NULL;
} else {
OpenPOWER on IntegriCloud