rsa_priv_encode: plug leak on PKCS8_pkey_set0() failure
authortb <tb@openbsd.org>
Thu, 10 Aug 2023 09:36:37 +0000 (09:36 +0000)
committertb <tb@openbsd.org>
Thu, 10 Aug 2023 09:36:37 +0000 (09:36 +0000)
commite4c1e59cffd82e818709a41b0b9b9fa7d92ee41d
tree08854d67be01d1fd0bca5c012163999f967310be
parent116f3cbfa99016305486ec0c1fc58090ee6bb7d6
rsa_priv_encode: plug leak on PKCS8_pkey_set0() failure

Change the code to use safer idioms and avoid nested function calls.

ok jsing
lib/libcrypto/rsa/rsa_ameth.c