summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_pmeth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/ec/ec_pmeth.c')
-rw-r--r--src/lib/libcrypto/ec/ec_pmeth.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libcrypto/ec/ec_pmeth.c b/src/lib/libcrypto/ec/ec_pmeth.c
index 7ba1d50d7f..07933dc5fd 100644
--- a/src/lib/libcrypto/ec/ec_pmeth.c
+++ b/src/lib/libcrypto/ec/ec_pmeth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_pmeth.c,v 1.7 2014/07/11 08:44:48 jsing Exp $ */ 1/* $OpenBSD: ec_pmeth.c,v 1.8 2014/07/12 16:03:37 miod Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -114,8 +114,7 @@ pkey_ec_cleanup(EVP_PKEY_CTX * ctx)
114{ 114{
115 EC_PKEY_CTX *dctx = ctx->data; 115 EC_PKEY_CTX *dctx = ctx->data;
116 if (dctx) { 116 if (dctx) {
117 if (dctx->gen_group) 117 EC_GROUP_free(dctx->gen_group);
118 EC_GROUP_free(dctx->gen_group);
119 free(dctx); 118 free(dctx);
120 } 119 }
121} 120}
@@ -213,8 +212,7 @@ pkey_ec_ctrl(EVP_PKEY_CTX * ctx, int type, int p1, void *p2)
213 ECerr(EC_F_PKEY_EC_CTRL, EC_R_INVALID_CURVE); 212 ECerr(EC_F_PKEY_EC_CTRL, EC_R_INVALID_CURVE);
214 return 0; 213 return 0;
215 } 214 }
216 if (dctx->gen_group) 215 EC_GROUP_free(dctx->gen_group);
217 EC_GROUP_free(dctx->gen_group);
218 dctx->gen_group = group; 216 dctx->gen_group = group;
219 return 1; 217 return 1;
220 218