]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix potential memory leaks in error paths in ossl_rsa_multiprime_derive()
authorNiels Dossche <niels.dossche@ugent.be>
Wed, 22 Jan 2025 14:43:14 +0000 (15:43 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 25 Feb 2025 14:37:18 +0000 (15:37 +0100)
commitf53432a0137ff45b68f01312d13ceb7462f21ff1
treeb2b3236438abaa891ceee2aa085eb54d72045c6d
parent0010856a43a90572625a1016a8481d536d4c5dd3
Fix potential memory leaks in error paths in ossl_rsa_multiprime_derive()

There are several cases where new BIGNUM instances are created, not
using the context, but not freed when an error occurs.
Fix this by adding the necessary calls to BN_free().

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26515)

(cherry picked from commit 8cdba24ceea00de9c0cd8f90bf662d632c37e14b)
crypto/rsa/rsa_gen.c