Skip to content

Commit

Permalink
Fix duplicate mutex allocation in threads_win.c
Browse files Browse the repository at this point in the history
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 #24086)

(cherry picked from commit 8e5918f)
  • Loading branch information
nhorman committed Apr 11, 2024
1 parent 7f04bb0 commit 6637d7d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion crypto/threads_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6637d7d

Please sign in to comment.