]> git.ipfire.org Git - thirdparty/openssl.git/commit
Unlock only when lock was successful
authorcchinchole <cpchinchole@gmail.com>
Tue, 2 Jul 2024 01:16:03 +0000 (20:16 -0500)
committerNeil Horman <nhorman@openssl.org>
Wed, 3 Jul 2024 20:02:00 +0000 (16:02 -0400)
commitc8789482214ca3b97b4b5035cf1fa9e788f5f695
tree1dff50f54aaf1d9c77f8f7de9e95f02ee5c84e2c
parent0378e75d9274649cbd1face90762bb0f23d952f1
Unlock only when lock was successful

Addressing issue (#24517):
Updated the example in CRYPTO_THREAD_run_once.pod to reflect that an unlock call should not be made if a write_lock failed.
Updated BIO_lookup_ex in bio_addr.c and ossl_engine_table_select in eng_table.c to not call unlock if the lock failed.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/24779)

(cherry picked from commit 3f4da93678497fe64d262d03c388932f7ecfe74e)
crypto/bio/bio_addr.c
crypto/engine/eng_table.c
doc/man3/CRYPTO_THREAD_run_once.pod