From: Loganaden Velvindron Date: Fri, 31 Jul 2015 17:20:16 +0000 (-0400) Subject: Clear BN-mont values when free'ing it. X-Git-Tag: OpenSSL_1_0_2e~148 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a5e26349f73de74019892eb9e592965e633fe7d5;p=oweals%2Fopenssl.git Clear BN-mont values when free'ing it. From a CloudFlare patch. Reviewed-by: Dr. Stephen Henson --- diff --git a/crypto/bn/bn_mont.c b/crypto/bn/bn_mont.c index aadd5db1d8..aafd1b8526 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); }