diff options
author | Neil Horman <nhorman@openssl.org> | 2024-04-10 08:28:43 -0400 |
---|---|---|
committer | Neil Horman <nhorman@openssl.org> | 2024-04-11 14:00:36 -0400 |
commit | 6637d7dfad51eb593eb0ba4ecce2adbac6ebcbec (patch) | |
tree | a62234fb32a3799977248c45e8c31dd6b56bb883 | |
parent | 7f04bb065d9d948d049ef1ef1bd4062cb7831392 (diff) |
Fix duplicate mutex allocation in threads_win.c
Creating an rcu lock does a double allocation of the underlying mutex.
Not sure how asan didn't catch this, but we clearly have a duplicate
line here
Fixes #24085
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24086)
(cherry picked from commit 8e5918fb8eb90289a0c89f6a4c6d623ecf49cf43)
-rw-r--r-- | crypto/threads_win.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/crypto/threads_win.c b/crypto/threads_win.c index 8428869963..9aec5e972f 100644 --- a/crypto/threads_win.c +++ b/crypto/threads_win.c @@ -158,7 +158,6 @@ CRYPTO_RCU_LOCK *ossl_rcu_lock_new(int num_writers) new->prior_signal = ossl_crypto_condvar_new(); new->alloc_lock = ossl_crypto_mutex_new(); new->prior_lock = ossl_crypto_mutex_new(); - new->write_lock = ossl_crypto_mutex_new(); new->qp_group = allocate_new_qp_group(new, num_writers + 1); if (new->qp_group == NULL || new->alloc_signal == NULL |