From 860147225e92c6e927984427f61321a163dcd09c Mon Sep 17 00:00:00 2001 From: two-heart <12869538+two-heart@users.noreply.github.com> Date: Thu, 4 Sep 2025 12:20:53 +0200 Subject: [PATCH] Only unlock in rsa_get_blinding when locking was successful MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit CLA: trivial Reviewed-by: Matt Caswell Reviewed-by: Saša Nedvědický Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/28438) (cherry picked from commit dbad8448c2fc659de380204592f31901daebffb8) --- crypto/rsa/rsa_ossl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/rsa/rsa_ossl.c b/crypto/rsa/rsa_ossl.c index 4165562757c..1e56c6d38c6 100644 --- a/crypto/rsa/rsa_ossl.c +++ b/crypto/rsa/rsa_ossl.c @@ -264,8 +264,8 @@ static BN_BLINDING *rsa_get_blinding(RSA *rsa, BN_CTX *ctx) BN_BLINDING_free(ret); ret = NULL; } + CRYPTO_THREAD_unlock(rsa->lock); } - CRYPTO_THREAD_unlock(rsa->lock); } return ret; -- 2.47.3