[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] Fix almost-infinite loop in pthread_key_create



Without this patch pthread_key_create doesn't stop when it finds an
available key, thus making PTHREAD_KEYS_MAX iterations and allocating
all keys in the process.

diff -urNdp nptl/pthread_key_create.c nptl/pthread_key_create.c
--- nptl/pthread_key_create.c	2002-09-19 11:57:31.000000000 +0200
+++ nptl/pthread_key_create.c	2002-10-31 22:31:31.000000000 +0100
@@ -56,6 +56,8 @@ __pthread_key_create (key, destr)
 
 	/* The call succeeded.  */
 	result = 0;
+
+	break;
       }
 
   lll_unlock (__pthread_keys_lock);

Attachment: pgp00002.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]