diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_oct.c')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_oct.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/lib/libcrypto/ec/ecp_oct.c b/src/lib/libcrypto/ec/ecp_oct.c index 2f2920d70d..d2402ee0d8 100644 --- a/src/lib/libcrypto/ec/ecp_oct.c +++ b/src/lib/libcrypto/ec/ecp_oct.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecp_oct.c,v 1.4 2014/06/12 15:49:29 deraadt Exp $ */ | 1 | /* $OpenBSD: ecp_oct.c,v 1.5 2014/07/12 16:03:37 miod Exp $ */ |
2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> | 2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> |
3 | * for the OpenSSL project. | 3 | * for the OpenSSL project. |
4 | * Includes code written by Bodo Moeller for the OpenSSL project. | 4 | * Includes code written by Bodo Moeller for the OpenSSL project. |
@@ -190,8 +190,7 @@ ec_GFp_simple_set_compressed_coordinates(const EC_GROUP * group, EC_POINT * poin | |||
190 | 190 | ||
191 | err: | 191 | err: |
192 | BN_CTX_end(ctx); | 192 | BN_CTX_end(ctx); |
193 | if (new_ctx != NULL) | 193 | BN_CTX_free(new_ctx); |
194 | BN_CTX_free(new_ctx); | ||
195 | return ret; | 194 | return ret; |
196 | } | 195 | } |
197 | 196 | ||
@@ -290,15 +289,13 @@ ec_GFp_simple_point2oct(const EC_GROUP * group, const EC_POINT * point, point_co | |||
290 | } | 289 | } |
291 | if (used_ctx) | 290 | if (used_ctx) |
292 | BN_CTX_end(ctx); | 291 | BN_CTX_end(ctx); |
293 | if (new_ctx != NULL) | 292 | BN_CTX_free(new_ctx); |
294 | BN_CTX_free(new_ctx); | ||
295 | return ret; | 293 | return ret; |
296 | 294 | ||
297 | err: | 295 | err: |
298 | if (used_ctx) | 296 | if (used_ctx) |
299 | BN_CTX_end(ctx); | 297 | BN_CTX_end(ctx); |
300 | if (new_ctx != NULL) | 298 | BN_CTX_free(new_ctx); |
301 | BN_CTX_free(new_ctx); | ||
302 | return 0; | 299 | return 0; |
303 | } | 300 | } |
304 | 301 | ||
@@ -391,7 +388,6 @@ ec_GFp_simple_oct2point(const EC_GROUP * group, EC_POINT * point, | |||
391 | 388 | ||
392 | err: | 389 | err: |
393 | BN_CTX_end(ctx); | 390 | BN_CTX_end(ctx); |
394 | if (new_ctx != NULL) | 391 | BN_CTX_free(new_ctx); |
395 | BN_CTX_free(new_ctx); | ||
396 | return ret; | 392 | return ret; |
397 | } | 393 | } |