about summary refs log tree commit diff
path: root/nptl/pthread_create.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-10-28 19:09:21 +0000
committerUlrich Drepper <drepper@redhat.com>2004-10-28 19:09:21 +0000
commita1fbd85875b335d88e3a531efc66ce972a010493 (patch)
treea436f3fba8c21ac1c262dc4823de6cccfd2d6ebf /nptl/pthread_create.c
parent7d4afb9b7fa6fabe5066f5e2ab4958f717fa8ada (diff)
downloadglibc-a1fbd85875b335d88e3a531efc66ce972a010493.tar.gz
glibc-a1fbd85875b335d88e3a531efc66ce972a010493.tar.xz
glibc-a1fbd85875b335d88e3a531efc66ce972a010493.zip
Update.
2004-10-28  Jakub Jelinek  <jakub@redhat.com>

	* pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
	if sched_priority is not between minprio and maxprio.
Diffstat (limited to 'nptl/pthread_create.c')
-rw-r--r--nptl/pthread_create.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 1bab72d1e9..7293f4c71c 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -459,10 +459,12 @@ __pthread_create_2_1 (newthread, attr, start_routine, arg)
   err = create_thread (pd, iattr, STACK_VARIABLES_ARGS);
   if (err != 0)
     {
-    errout:
       /* Something went wrong.  Free the resources.  */
       if (!is_detached)
-	__deallocate_stack (pd);
+	{
+	errout:
+	  __deallocate_stack (pd);
+	}
       return err;
     }