From be203ea3d3a60a881993d1f7552084996d34ba0a Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 25 Sep 2023 16:44:47 +0100 Subject: Fix a mem leak when the FIPS provider is used in a different thread We were neglecting to register the main thread to receive thread stop notifications. This is important if the thread that starts the FIPS provider is not the same one that is used when OPENSSL_cleanup() is called. Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/21964) --- include/crypto/context.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/crypto/context.h b/include/crypto/context.h index 56c68f4ec1..af81e15e1d 100644 --- a/include/crypto/context.h +++ b/include/crypto/context.h @@ -21,6 +21,7 @@ void *ossl_child_prov_ctx_new(OSSL_LIB_CTX *); void *ossl_prov_drbg_nonce_ctx_new(OSSL_LIB_CTX *); void *ossl_self_test_set_callback_new(OSSL_LIB_CTX *); void *ossl_rand_crng_ctx_new(OSSL_LIB_CTX *); +int ossl_thread_register_fips(OSSL_LIB_CTX *); void *ossl_thread_event_ctx_new(OSSL_LIB_CTX *); void *ossl_fips_prov_ossl_ctx_new(OSSL_LIB_CTX *); #if defined(OPENSSL_THREADS) -- cgit v1.2.3