[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] openssl_mutexes code belongs in openssl_mgt.c
commit 23473f5e747a2d9fa2a2a4637283eb53a8c84ca6
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Tue Jan 23 14:43:06 2018 -0500
openssl_mutexes code belongs in openssl_mgt.c
---
src/common/crypto.c | 14 --------------
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 3ff3a98e0..107b53ad2 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 db5a52726..bc8f71798 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) */
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits