From 7302aa76140e9921ce27e5da9636ec5c839f136a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=86=9B=E6=B6=9B?= Date: Tue, 19 Apr 2022 17:31:35 +0800 Subject: [PATCH] wolfSSL: Fix the memory leak of crypto_ec_point_compute_y_sqr() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Local variable "t" needs to be cleared whether "calced" is 0 or 1. Signed-off-by: 赵军涛 --- src/crypto/crypto_wolfssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }