Fix a merge mistake in engne_list_add
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 15 Sep 2023 07:56:01 +0000 (09:56 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 15 Sep 2023 07:56:01 +0000 (09:56 +0200)
commitbb67dff95aeb21047b95f92c5119cb63e75cfd2f
tree291f7782fe6a508e372860048661015439d2cb9b
parent5b7167a922344ccfe0aa5621e29d0aafdfc74770
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)
crypto/engine/eng_list.c