From 8f33105e1b7196114fccba59a2891c15041ccca7 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sat, 31 Jul 2004 08:34:16 +0000 Subject: [PATCH] * threads.c (krb5int_thread_support_init): Do finish initialization after key creation in POSIX case git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16635 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/support/ChangeLog | 5 +++++ src/util/support/threads.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/util/support/ChangeLog b/src/util/support/ChangeLog index aff1b7aa9..d460e5443 100644 --- a/src/util/support/ChangeLog +++ b/src/util/support/ChangeLog @@ -1,3 +1,8 @@ +2004-07-31 Ken Raeburn + + * threads.c (krb5int_thread_support_init): Do finish + initialization after key creation in POSIX case. + 2004-07-23 Ken Raeburn * fake-addrinfo.c (krb5int_fac): Initialize the mutex. diff --git a/src/util/support/threads.c b/src/util/support/threads.c index 1e2430b9a..dd9819487 100644 --- a/src/util/support/threads.c +++ b/src/util/support/threads.c @@ -344,8 +344,11 @@ int krb5int_thread_support_init (void) err = k5_mutex_finish_init(&key_lock); if (err) return err; - if (K5_PTHREADS_LOADED) - return pthread_key_create(&key, thread_termination); + if (K5_PTHREADS_LOADED) { + err = pthread_key_create(&key, thread_termination); + if (err) + return err; + } #endif -- 2.26.2