summaryrefslogtreecommitdiffstats
path: root/crypto/init.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-02-18 13:24:09 +0100
committerMatt Caswell <matt@openssl.org>2016-02-18 16:27:16 +0100
commit6bc7bad011d98e38039105dc2624426917c0e587 (patch)
tree00d8beb56bb9d015c87e9722d53210de7f0b754f /crypto/init.c
parentFix OPENSSL_config with NULL parameter (diff)
downloadopenssl-6bc7bad011d98e38039105dc2624426917c0e587.tar.xz
openssl-6bc7bad011d98e38039105dc2624426917c0e587.zip
Fix windows thread stop code
The windows thread stop code was erroneously not just deleting the thread local variable on thread stop, but also deleting the thread local *key* (thus removing thread local data for *all* threads in one go!). Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/init.c')
-rw-r--r--crypto/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/init.c b/crypto/init.c
index 8775b82a22..cbe07df2a2 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -506,7 +506,6 @@ static void ossl_init_thread_stop(struct thread_local_inits_st *locals)
}
OPENSSL_free(locals);
- ossl_init_thread_stop_cleanup();
}
void OPENSSL_thread_stop(void)
@@ -599,6 +598,8 @@ void OPENSSL_cleanup(void)
ERR_free_strings();
}
+ ossl_init_thread_stop_cleanup();
+
#ifdef OPENSSL_INIT_DEBUG
fprintf(stderr, "OPENSSL_INIT: OPENSSL_INIT_library_stop: "
"CRYPTO_cleanup_all_ex_data()\n");