From: Nicola Tuveri Date: Wed, 11 Sep 2019 23:25:45 +0000 (+0300) Subject: Avoid using EC_GROUP_clear_free() internally X-Git-Tag: openssl-3.0.0-alpha1~1094 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cdf8d0db79250258c28c2b4249aedca779bab766;p=oweals%2Fopenssl.git 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) --- 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; }