]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wolfSSL: Fix the memory leak of crypto_ec_point_compute_y_sqr()
author赵军涛 <d2014zjt@163.com>
Tue, 19 Apr 2022 09:31:35 +0000 (17:31 +0800)
committerJouni Malinen <j@w1.fi>
Sat, 23 Apr 2022 12:55:06 +0000 (15:55 +0300)
Local variable "t" needs to be cleared whether "calced" is 0 or 1.

Signed-off-by: 赵军涛 <d2014zjt@163.com>
src/crypto/crypto_wolfssl.c

index 8c3b7626e530f3b7cb860d6ca96284e07451b73c..f9dc1bfdfe8c17d6ddcbe38398568a7702e816bc 100644 (file)
@@ -1678,9 +1678,9 @@ done:
                        mp_clear(y2);
                        os_free(y2);
                }
-               mp_clear(&t);
        }
 
+       mp_clear(&t);
        return (struct crypto_bignum *) y2;
 }