]> 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:36:43 +0000 (15:36 +0100)
commit8cdba24ceea00de9c0cd8f90bf662d632c37e14b
tree7963c80763615233923a6c03309be8f7c0e14841
parent7e80b16776a58aad8bfe5d81c2909757115545da
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)
crypto/rsa/rsa_gen.c