crypto/init.c: use destructor_key even as guard in OPENSSL_thread_stop.
authorAndy Polyakov <appro@openssl.org>
Fri, 20 Jul 2018 11:23:42 +0000 (13:23 +0200)
committerAndy Polyakov <appro@openssl.org>
Sun, 29 Jul 2018 19:08:33 +0000 (21:08 +0200)
commit3c0addb71c66adf729f48050c3a75f68c44b23b6
treef57fae802a7e9bac87aef89d4448833d5bde3195
parent811162832e875576c13139493d949b3157a1c8cf
crypto/init.c: use destructor_key even as guard in OPENSSL_thread_stop.

Problem was that Windows threads that were terminating before libcrypto
was initialized were referencing uninitialized or possibly even
unrelated thread local storage index.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6799)

(cherry picked from commit 80ae7285e1994d35c84519bf9e038b11d9942875)

Resolved conflicts:
crypto/init.c
crypto/init.c