summaryrefslogtreecommitdiffstats
path: root/crypto/init.c
diff options
context:
space:
mode:
authorMathias Berchtold <mberchtold@gmail.com>2022-04-22 19:26:18 -0500
committerTomas Mraz <tomas@openssl.org>2022-04-26 16:44:42 +0200
commit1d64b068ca74b68394c96fd2e3020235d32928f2 (patch)
treef789c8b1e85979f30942aad7141d72a8a8775b05 /crypto/init.c
parent7510aee28a3262cde442230c06daffa1e7609fd6 (diff)
Move ossl_deinit_casecmp to the end of OPENSSL_cleanup()
Calls like evp_cleanup_int() depend on OPENSSL_strcasecmp(). Fixes https://github.com/openssl/openssl/issues/18160 Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18161)
Diffstat (limited to 'crypto/init.c')
-rw-r--r--crypto/init.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/init.c b/crypto/init.c
index d859bd42c6..41cd30eeff 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -397,11 +397,6 @@ void OPENSSL_cleanup(void)
async_deinit();
}
- if (casecmp_inited) {
- OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_deinit_casecmp()\n");
- ossl_deinit_casecmp();
- }
-
if (load_crypto_strings_inited) {
OSSL_TRACE(INIT, "OPENSSL_cleanup: err_free_strings_int()\n");
err_free_strings_int();
@@ -462,6 +457,11 @@ void OPENSSL_cleanup(void)
OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_trace_cleanup()\n");
ossl_trace_cleanup();
+ if (casecmp_inited) {
+ OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_deinit_casecmp()\n");
+ ossl_deinit_casecmp();
+ }
+
base_inited = 0;
}