From cdf8d0db79250258c28c2b4249aedca779bab766 Mon Sep 17 00:00:00 2001 From: Nicola Tuveri Date: Thu, 12 Sep 2019 02:25:45 +0300 Subject: [PATCH] Avoid using EC_GROUP_clear_free() internally There is nothing confidential in `EC_GROUP` so really having a `EC_GROUP_clear_free` function at all does not make much sense anymore. See https://github.com/openssl/openssl/issues/9822 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/9874) --- crypto/ec/ec_cvt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/ec/ec_cvt.c b/crypto/ec/ec_cvt.c index ec8989f64a..0fdd5f672c 100644 --- a/crypto/ec/ec_cvt.c +++ b/crypto/ec/ec_cvt.c @@ -53,7 +53,7 @@ EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, return NULL; if (!EC_GROUP_set_curve(ret, p, a, b, ctx)) { - EC_GROUP_clear_free(ret); + EC_GROUP_free(ret); return NULL; } @@ -74,7 +74,7 @@ EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, return NULL; if (!EC_GROUP_set_curve(ret, p, a, b, ctx)) { - EC_GROUP_clear_free(ret); + EC_GROUP_free(ret); return NULL; } -- 2.25.1