]> 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:11:56 +0000 (16:11 -0400)
commit9a74998c7527f328597852c9579aed10d6ba325c
tree04be3ec696a577a517430a199f523d779455fbb4
parenteddbe3a152fadfbda07c8dc1c8f44ec2c536d837
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