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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c
index 81674399a1..e7de399cde 100644
--- a/linuxthreads/manager.c
+++ b/linuxthreads/manager.c
@@ -336,9 +336,9 @@ static void pthread_free(pthread_descr th)
   if (!th->p_userstack)
     {
       /* Free the stack and thread descriptor area */
-      munmap((caddr_t) ((char *)(th+1) - STACK_SIZE), STACK_SIZE);
       if (th->p_guardsize != 0)
 	munmap(th->p_guardaddr, th->p_guardsize);
+      munmap((caddr_t) ((char *)(th+1) - STACK_SIZE), STACK_SIZE);
     }
 }