Skip to content

Commit 94468c7

Browse files
dev-aaront-orgt8m
authored andcommitted
Remove an unnecessary call to BN_CTX_free.
Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#11452)
1 parent 0e8b6c9 commit 94468c7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crypto/ec/ec_check.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
int EC_GROUP_check_named_curve(const EC_GROUP *group, int nist_only,
2020
BN_CTX *ctx)
2121
{
22-
int nid = NID_undef;
22+
int nid;
2323
BN_CTX *new_ctx = NULL;
2424

2525
if (group == NULL) {
2626
ECerr(0, ERR_R_PASSED_NULL_PARAMETER);
27-
goto err;
27+
return NID_undef;
2828
}
2929

3030
if (ctx == NULL) {
@@ -39,7 +39,6 @@ int EC_GROUP_check_named_curve(const EC_GROUP *group, int nist_only,
3939
if (nid > 0 && nist_only && EC_curve_nid2nist(nid) == NULL)
4040
nid = NID_undef;
4141

42-
err:
4342
BN_CTX_free(new_ctx);
4443
return nid;
4544
}

0 commit comments

Comments
 (0)