diff options
Diffstat (limited to 'lib/libpthread/thread/thr_create.c')
-rw-r--r-- | lib/libpthread/thread/thr_create.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libpthread/thread/thr_create.c b/lib/libpthread/thread/thr_create.c index f552ee5..e9ab203 100644 --- a/lib/libpthread/thread/thr_create.c +++ b/lib/libpthread/thread/thr_create.c @@ -294,9 +294,10 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr, ret = _thr_schedule_add(curthread, new_thread); if (ret != 0) free_thread(curthread, new_thread); - - /* Return a pointer to the thread structure: */ - (*thread) = new_thread; + else { + /* Return a pointer to the thread structure: */ + (*thread) = new_thread; + } } } |