about summary refs log tree commit diff
path: root/linuxthreads/manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/manager.c')
-rw-r--r--linuxthreads/manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c
index 1510551374..6531775458 100644
--- a/linuxthreads/manager.c
+++ b/linuxthreads/manager.c
@@ -330,6 +330,8 @@ static int pthread_allocate_stack(const pthread_attr_t *attr,
 #ifndef THREAD_SELF
       __pthread_nonstandard_stacks = 1;
 #endif
+      /* Clear the thread data structure.  */
+      memset (new_thread, '\0', sizeof (*new_thread));
     }
   else
     {
@@ -448,8 +450,6 @@ static int pthread_allocate_stack(const pthread_attr_t *attr,
 # endif
 #endif /* !NEED_SEPARATE_REGISTER_STACK */
     }
-  /* Clear the thread data structure.  */
-  memset (new_thread, '\0', sizeof (*new_thread));
   *out_new_thread = new_thread;
   *out_new_thread_bottom = new_thread_bottom;
   *out_guardaddr = guardaddr;