From: 赵军涛 Date: Tue, 19 Apr 2022 09:31:35 +0000 (+0800) Subject: wolfSSL: Fix the memory leak of crypto_ec_point_compute_y_sqr() X-Git-Tag: hostap_2_11~2015 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7302aa76140e9921ce27e5da9636ec5c839f136a;p=thirdparty%2Fhostap.git wolfSSL: Fix the memory leak of crypto_ec_point_compute_y_sqr() Local variable "t" needs to be cleared whether "calced" is 0 or 1. Signed-off-by: 赵军涛 --- diff --git a/src/crypto/crypto_wolfssl.c b/src/crypto/crypto_wolfssl.c index 8c3b7626e..f9dc1bfdf 100644 --- a/src/crypto/crypto_wolfssl.c +++ b/src/crypto/crypto_wolfssl.c @@ -1678,9 +1678,9 @@ done: mp_clear(y2); os_free(y2); } - mp_clear(&t); } + mp_clear(&t); return (struct crypto_bignum *) y2; }