Fix a possible memleak in rsa_pub_encode
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 7 Sep 2023 17:22:25 +0000 (19:22 +0200)
committerTomas Mraz <tomas@openssl.org>
Mon, 11 Sep 2023 08:50:34 +0000 (10:50 +0200)
commitb98fdb318b367d73cae7680eb264c4424098d537
tree60b16b6949427a95b915e5b337c41a14a71127df
parenta6101a3bf0f28011ae6fe692d0fd8ccecf4bdc03
Fix a possible memleak in rsa_pub_encode

That seems to be only an issue for RSA-PSS with parameters.
Spotted by code review, so it looks like there is no test coverage for this.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22032)

(cherry picked from commit 285eb1688f05ad477fefc681bf05d0afedc46d40)
crypto/rsa/rsa_ameth.c
test/recipes/15-test_rsapss.t