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 /src/common/crypto_openssl_mgt.c | |
parent | fa694f5af38d183471aeeba2799aa82bd4fc0a65 (diff) | |
download | tor-23473f5e747a2d9fa2a2a4637283eb53a8c84ca6.tar.gz tor-23473f5e747a2d9fa2a2a4637283eb53a8c84ca6.zip |
openssl_mutexes code belongs in openssl_mgt.c
Diffstat (limited to 'src/common/crypto_openssl_mgt.c')
-rw-r--r-- | src/common/crypto_openssl_mgt.c | 14 |
1 files changed, 14 insertions, 0 deletions
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) */ } |