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
740ceb5b0c
commit
1a586b3942
@ -339,9 +339,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…
x
Reference in New Issue
Block a user