From fa93f2d531e73c45da8dccbe6a277f6905b0b542 Mon Sep 17 00:00:00 2001 From: Paul Zimmermann <Paul.Zimmermann@inria.fr> Date: Sat, 22 Jun 2024 08:13:00 +0200 Subject: [PATCH] fixed double free --- parametrizations.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/parametrizations.c b/parametrizations.c index d8f458ca..7b15e8c5 100644 --- a/parametrizations.c +++ b/parametrizations.c @@ -165,7 +165,7 @@ get_curve_from_param0 (mpz_t f, mpres_t A, mpres_t x, mpz_t sigma, mpmod_t n) mpres_t t, u, v, b, z; mpz_t tmp; int ret = ECM_NO_FACTOR_FOUND; - + mpres_init (t, n); mpres_init (u, n); mpres_init (v, n); @@ -205,12 +205,6 @@ get_curve_from_param0 (mpz_t f, mpres_t A, mpres_t x, mpz_t sigma, mpmod_t n) if (!mpres_invert (u, v, n)) /* u = (b*z)^(-1) (mod n) */ { mpres_gcd (f, v, n); - mpres_clear (t, n); - mpres_clear (u, n); - mpres_clear (v, n); - mpres_clear (b, n); - mpres_clear (z, n); - mpz_clear (tmp); if (mpz_cmp (f, n->orig_modulus) == 0) ret = ECM_ERROR; else -- GitLab