]> 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 19:42:02 +0000 (15:42 -0400)
commitbce6a810100164fbd308c4587446cb024cb03944
tree5baaf4aad25fbe9405650d35545a06abd2a264da
parentf0ab3d12ddf8313477ae839920df2a55f3029650
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