diff options
author | Aaron Thompson <dev@aaront.org> | 2020-03-31 07:19:16 +0000 |
---|---|---|
committer | Tomas Mraz <tmraz@fedoraproject.org> | 2020-04-03 10:42:14 +0200 |
commit | 94468c775c8e23dae8549ca15b4f9e0718650b0c (patch) | |
tree | 1b7ee7b12f1d4b0efdd1904a1d4db99780ccae5d /crypto/ec/ec_check.c | |
parent | 0e8b6c97ba7ac37f5e92f6a24d128b04b5336388 (diff) |
Remove an unnecessary call to BN_CTX_free.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11452)
Diffstat (limited to 'crypto/ec/ec_check.c')
-rw-r--r-- | crypto/ec/ec_check.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/ec/ec_check.c b/crypto/ec/ec_check.c index 1283d8404f..a4cc8073de 100644 --- a/crypto/ec/ec_check.c +++ b/crypto/ec/ec_check.c @@ -19,12 +19,12 @@ int EC_GROUP_check_named_curve(const EC_GROUP *group, int nist_only, BN_CTX *ctx) { - int nid = NID_undef; + int nid; BN_CTX *new_ctx = NULL; if (group == NULL) { ECerr(0, ERR_R_PASSED_NULL_PARAMETER); - goto err; + return NID_undef; } if (ctx == NULL) { @@ -39,7 +39,6 @@ int EC_GROUP_check_named_curve(const EC_GROUP *group, int nist_only, if (nid > 0 && nist_only && EC_curve_nid2nist(nid) == NULL) nid = NID_undef; -err: BN_CTX_free(new_ctx); return nid; } |