openssl/crypto/encode_decode
Neil Horman c0527256d2 Fix missing unlock in decoder_pkey.c
We hit an assertion failure during a call to CRYPTO_THREAD_read_lock
during memfail testing.

This was caused by us attempting to take a read lock in the same thread
that already held the same lock for writing resulting in an EBUSY
return.

This occured because we triggered a memory failure path in
DECODER_new_for_pkey, which never unlocked a write lock we were holding.

Fix it by ensuring the lock is released in the error path.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28216)
2025-08-12 14:15:50 -04:00
..
build.info CORE: Generalise internal pass phrase prompter 2020-08-24 10:02:25 +02:00
decoder_err.c err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
decoder_lib.c libapps + libcrypto: Silence warnings on Win64 builds 2025-07-02 17:26:26 +02:00
decoder_meth.c libapps + libcrypto: Silence warnings on Win64 builds 2025-07-02 17:26:26 +02:00
decoder_pkey.c Fix missing unlock in decoder_pkey.c 2025-08-12 14:15:50 -04:00
encoder_err.c Update copyright year 2021-06-17 13:24:59 +01:00
encoder_lib.c Copyright year updates 2025-03-12 13:35:59 +00:00
encoder_local.h decoders: Fix prioritization of decoders via property query 2025-07-01 19:06:57 +02:00
encoder_meth.c libapps + libcrypto: Silence warnings on Win64 builds 2025-07-02 17:26:26 +02:00
encoder_pkey.c crypto: use array memory (re)allocation routines 2025-08-08 12:22:10 -04:00