From: Tomas Mraz Date: Mon, 23 Jun 2025 12:49:11 +0000 (+0200) Subject: init_master_key(): Check return of CRYPTO_THREAD_init_local() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c45ab5b8de0c662917ec26e81bc1c87fa8095a4f;p=thirdparty%2Fopenssl.git init_master_key(): Check return of CRYPTO_THREAD_init_local() Fixes Coverity 1649566 Reviewed-by: Shane Lontis Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/27880) --- diff --git a/crypto/threads_common.c b/crypto/threads_common.c index c255c87df91..024c0eb53d6 100644 --- a/crypto/threads_common.c +++ b/crypto/threads_common.c @@ -222,7 +222,8 @@ static void init_master_key(void) * (that is assigned via CRYPTO_THREAD_set_local_ex), are still expected * to be cleaned via the ossl_init_thread_start/stop api. */ - CRYPTO_THREAD_init_local(&master_key, clean_master_key); + if (!CRYPTO_THREAD_init_local(&master_key, clean_master_key)) + return; /* * Indicate that the key has been set up.