Clear BN-mont values when free'ing it.
From a CloudFlare patch. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
This commit is contained in:
parent
b68fa4d19e
commit
a5e26349f7
@ -361,9 +361,9 @@ void BN_MONT_CTX_free(BN_MONT_CTX *mont)
|
||||
if (mont == NULL)
|
||||
return;
|
||||
|
||||
BN_free(&(mont->RR));
|
||||
BN_free(&(mont->N));
|
||||
BN_free(&(mont->Ni));
|
||||
BN_clear_free(&(mont->RR));
|
||||
BN_clear_free(&(mont->N));
|
||||
BN_clear_free(&(mont->Ni));
|
||||
if (mont->flags & BN_FLG_MALLOCED)
|
||||
OPENSSL_free(mont);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user