diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_nistp224.c')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_nistp224.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/lib/libcrypto/ec/ecp_nistp224.c b/src/lib/libcrypto/ec/ecp_nistp224.c index c466d2db83..ed0bad2a72 100644 --- a/src/lib/libcrypto/ec/ecp_nistp224.c +++ b/src/lib/libcrypto/ec/ecp_nistp224.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecp_nistp224.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */ | 1 | /* $OpenBSD: ecp_nistp224.c,v 1.15 2014/07/12 16:03:37 miod Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Emilia Kasper (Google) for the OpenSSL project. | 3 | * Written by Emilia Kasper (Google) for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -1285,8 +1285,7 @@ ec_GFp_nistp224_group_set_curve(EC_GROUP * group, const BIGNUM * p, | |||
1285 | ret = ec_GFp_simple_group_set_curve(group, p, a, b, ctx); | 1285 | ret = ec_GFp_simple_group_set_curve(group, p, a, b, ctx); |
1286 | err: | 1286 | err: |
1287 | BN_CTX_end(ctx); | 1287 | BN_CTX_end(ctx); |
1288 | if (new_ctx != NULL) | 1288 | BN_CTX_free(new_ctx); |
1289 | BN_CTX_free(new_ctx); | ||
1290 | return ret; | 1289 | return ret; |
1291 | } | 1290 | } |
1292 | 1291 | ||
@@ -1545,10 +1544,8 @@ ec_GFp_nistp224_points_mul(const EC_GROUP * group, EC_POINT * r, | |||
1545 | 1544 | ||
1546 | err: | 1545 | err: |
1547 | BN_CTX_end(ctx); | 1546 | BN_CTX_end(ctx); |
1548 | if (generator != NULL) | 1547 | EC_POINT_free(generator); |
1549 | EC_POINT_free(generator); | 1548 | BN_CTX_free(new_ctx); |
1550 | if (new_ctx != NULL) | ||
1551 | BN_CTX_free(new_ctx); | ||
1552 | free(secrets); | 1549 | free(secrets); |
1553 | free(pre_comp); | 1550 | free(pre_comp); |
1554 | free(tmp_felems); | 1551 | free(tmp_felems); |
@@ -1676,12 +1673,9 @@ ec_GFp_nistp224_precompute_mult(EC_GROUP * group, BN_CTX * ctx) | |||
1676 | pre = NULL; | 1673 | pre = NULL; |
1677 | err: | 1674 | err: |
1678 | BN_CTX_end(ctx); | 1675 | BN_CTX_end(ctx); |
1679 | if (generator != NULL) | 1676 | EC_POINT_free(generator); |
1680 | EC_POINT_free(generator); | 1677 | BN_CTX_free(new_ctx); |
1681 | if (new_ctx != NULL) | 1678 | nistp224_pre_comp_free(pre); |
1682 | BN_CTX_free(new_ctx); | ||
1683 | if (pre) | ||
1684 | nistp224_pre_comp_free(pre); | ||
1685 | return ret; | 1679 | return ret; |
1686 | } | 1680 | } |
1687 | 1681 | ||