diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_nistp256.c')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_nistp256.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/lib/libcrypto/ec/ecp_nistp256.c b/src/lib/libcrypto/ec/ecp_nistp256.c index 7b122e6307..6905b614bc 100644 --- a/src/lib/libcrypto/ec/ecp_nistp256.c +++ b/src/lib/libcrypto/ec/ecp_nistp256.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecp_nistp256.c,v 1.13 2014/07/10 22:45:57 jsing Exp $ */ | 1 | /* $OpenBSD: ecp_nistp256.c,v 1.14 2014/07/12 16:03:37 miod Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Adam Langley (Google) for the OpenSSL project | 3 | * Written by Adam Langley (Google) for the OpenSSL project |
4 | */ | 4 | */ |
@@ -1834,8 +1834,7 @@ ec_GFp_nistp256_group_set_curve(EC_GROUP * group, const BIGNUM * p, | |||
1834 | ret = ec_GFp_simple_group_set_curve(group, p, a, b, ctx); | 1834 | ret = ec_GFp_simple_group_set_curve(group, p, a, b, ctx); |
1835 | err: | 1835 | err: |
1836 | BN_CTX_end(ctx); | 1836 | BN_CTX_end(ctx); |
1837 | if (new_ctx != NULL) | 1837 | BN_CTX_free(new_ctx); |
1838 | BN_CTX_free(new_ctx); | ||
1839 | return ret; | 1838 | return ret; |
1840 | } | 1839 | } |
1841 | 1840 | ||
@@ -2098,10 +2097,8 @@ ec_GFp_nistp256_points_mul(const EC_GROUP * group, EC_POINT * r, | |||
2098 | 2097 | ||
2099 | err: | 2098 | err: |
2100 | BN_CTX_end(ctx); | 2099 | BN_CTX_end(ctx); |
2101 | if (generator != NULL) | 2100 | EC_POINT_free(generator); |
2102 | EC_POINT_free(generator); | 2101 | BN_CTX_free(new_ctx); |
2103 | if (new_ctx != NULL) | ||
2104 | BN_CTX_free(new_ctx); | ||
2105 | free(secrets); | 2102 | free(secrets); |
2106 | free(pre_comp); | 2103 | free(pre_comp); |
2107 | free(tmp_smallfelems); | 2104 | free(tmp_smallfelems); |
@@ -2223,12 +2220,9 @@ ec_GFp_nistp256_precompute_mult(EC_GROUP * group, BN_CTX * ctx) | |||
2223 | pre = NULL; | 2220 | pre = NULL; |
2224 | err: | 2221 | err: |
2225 | BN_CTX_end(ctx); | 2222 | BN_CTX_end(ctx); |
2226 | if (generator != NULL) | 2223 | EC_POINT_free(generator); |
2227 | EC_POINT_free(generator); | 2224 | BN_CTX_free(new_ctx); |
2228 | if (new_ctx != NULL) | 2225 | nistp256_pre_comp_free(pre); |
2229 | BN_CTX_free(new_ctx); | ||
2230 | if (pre) | ||
2231 | nistp256_pre_comp_free(pre); | ||
2232 | return ret; | 2226 | return ret; |
2233 | } | 2227 | } |
2234 | 2228 | ||