mirror of
https://github.com/openssl/openssl.git
synced 2025-03-19 19:50:42 +08:00
Fix potential double free in rsa_keygen pairwise test.
It should never hit this branch of code, so there is no feasible test. Found due to a similar issue in PR #12176. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12177)
This commit is contained in:
parent
a4e440d647
commit
7905806c94
@ -451,6 +451,12 @@ static int rsa_keygen(OPENSSL_CTX *libctx, RSA *rsa, int bits, int primes,
|
||||
BN_clear_free(rsa->dmp1);
|
||||
BN_clear_free(rsa->dmq1);
|
||||
BN_clear_free(rsa->iqmp);
|
||||
rsa->d = NULL;
|
||||
rsa->p = NULL;
|
||||
rsa->q = NULL;
|
||||
rsa->dmp1 = NULL;
|
||||
rsa->dmq1 = NULL;
|
||||
rsa->iqmp = NULL;
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
|
Loading…
x
Reference in New Issue
Block a user