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
decoder_err.c
decoder_lib.c
decoder_meth.c
decoder_pkey.c
encoder_err.c
encoder_lib.c
encoder_local.h
encoder_meth.c
encoder_pkey.c