diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-01-23 14:43:06 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-01-23 14:43:06 -0500 |
commit | 23473f5e747a2d9fa2a2a4637283eb53a8c84ca6 (patch) | |
tree | a4da48aca70db7141e613ebe2ad741f2af97d202 | |
parent | fa694f5af38d183471aeeba2799aa82bd4fc0a65 (diff) | |
download | tor-23473f5e747a2d9fa2a2a4637283eb53a8c84ca6.tar.gz tor-23473f5e747a2d9fa2a2a4637283eb53a8c84ca6.zip |
openssl_mutexes code belongs in openssl_mgt.c
-rw-r--r-- | src/common/crypto.c | 14 | ||||
-rw-r--r-- | src/common/crypto_openssl_mgt.c | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index 3ff3a98e0d..107b53ad29 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -3352,20 +3352,6 @@ crypto_global_cleanup(void) CONF_modules_unload(1); CRYPTO_cleanup_all_ex_data(); -#ifndef NEW_THREAD_API - if (n_openssl_mutexes_) { - int n = n_openssl_mutexes_; - tor_mutex_t **ms = openssl_mutexes_; - int i; - openssl_mutexes_ = NULL; - n_openssl_mutexes_ = 0; - for (i=0;i<n;++i) { - tor_mutex_free(ms[i]); - } - tor_free(ms); - } -#endif /* !defined(NEW_THREAD_API) */ - crypto_openssl_free_all(); crypto_early_initialized_ = 0; diff --git a/src/common/crypto_openssl_mgt.c b/src/common/crypto_openssl_mgt.c index db5a527263..bc8f717980 100644 --- a/src/common/crypto_openssl_mgt.c +++ b/src/common/crypto_openssl_mgt.c @@ -143,5 +143,19 @@ crypto_openssl_free_all(void) { tor_free(crypto_openssl_version_str); tor_free(crypto_openssl_header_version_str); + +#ifndef NEW_THREAD_API + if (n_openssl_mutexes_) { + int n = n_openssl_mutexes_; + tor_mutex_t **ms = openssl_mutexes_; + int i; + openssl_mutexes_ = NULL; + n_openssl_mutexes_ = 0; + for (i=0;i<n;++i) { + tor_mutex_free(ms[i]); + } + tor_free(ms); + } +#endif /* !defined(NEW_THREAD_API) */ } |