diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2023-09-15 09:56:01 +0200 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2023-09-15 10:13:58 +0200 |
commit | 7f81dec985b830db348eb025927f2cd0406b7b7e (patch) | |
tree | 95b6aa1317ca52c2c0a18a0f64fe7f81b94a8cb4 /crypto/engine | |
parent | ecd41bb3c315bd6d0c7e591bea7fdc65387d5905 (diff) |
Fix a merge mistake in engne_list_add
master version increments the struct_ref early
and needs to decrement the struct_ref on error,
while 3.1 and 3.0 increment the struct_ref later.
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22115)
(cherry picked from commit bb67dff95aeb21047b95f92c5119cb63e75cfd2f)
Diffstat (limited to 'crypto/engine')
-rw-r--r-- | crypto/engine/eng_list.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/crypto/engine/eng_list.c b/crypto/engine/eng_list.c index d3bd0c0dc2..d9e620dc58 100644 --- a/crypto/engine/eng_list.c +++ b/crypto/engine/eng_list.c @@ -82,7 +82,6 @@ static int engine_list_add(ENGINE *e) * The first time the list allocates, we should register the cleanup. */ if (!engine_cleanup_add_last(engine_list_cleanup)) { - CRYPTO_DOWN_REF(&e->struct_ref, &ref); ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR); return 0; } |