In err_cleanup(), cleanup the thread local storage too
authorRichard Levitte <levitte@openssl.org>
Sun, 26 Mar 2017 18:01:44 +0000 (20:01 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 27 Mar 2017 10:54:40 +0000 (12:54 +0200)
Fixes #3033

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3035)

crypto/err/err.c

index 44a293a..d5cad05 100644 (file)
@@ -259,6 +259,7 @@ DEFINE_RUN_ONCE_STATIC(do_err_strings_init)
 
 void err_cleanup(void)
 {
+    CRYPTO_THREAD_cleanup_local(&err_thread_local);
     CRYPTO_THREAD_lock_free(err_string_lock);
     err_string_lock = NULL;
 }