From e06d3a1e38c12aa9a9fdb975fc4d7bde83362297 Mon Sep 17 00:00:00 2001 From: Loganaden Velvindron Date: Fri, 31 Jul 2015 13:20:16 -0400 Subject: Clear BN-mont values when free'ing it. From a CloudFlare patch. Reviewed-by: Dr. Stephen Henson --- crypto/bn/bn_mont.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto/bn/bn_mont.c b/crypto/bn/bn_mont.c index aadd5db..aafd1b8 100644 --- a/crypto/bn/bn_mont.c +++ b/crypto/bn/bn_mont.c @@ -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); } -- 1.7.12.1