aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ec/ec_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ec/ec_lib.c')
-rw-r--r--crypto/ec/ec_lib.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c
index cd08a5553c..793645de8a 100644
--- a/crypto/ec/ec_lib.c
+++ b/crypto/ec/ec_lib.c
@@ -83,37 +83,25 @@ EC_GROUP *EC_GROUP_new(const EC_METHOD *meth)
return NULL;
}
- ret = OPENSSL_malloc(sizeof(*ret));
+ ret = OPENSSL_zalloc(sizeof(*ret));
if (ret == NULL) {
ECerr(EC_F_EC_GROUP_NEW, ERR_R_MALLOC_FAILURE);
return NULL;
}
ret->meth = meth;
-
- ret->extra_data = NULL;
- ret->mont_data = NULL;
-
- ret->generator = NULL;
ret->order = BN_new();
- ret->cofactor = NULL;
if (!ret->order)
goto err;
ret->cofactor = BN_new();
if (!ret->cofactor)
goto err;
-
- ret->curve_name = 0;
ret->asn1_flag = OPENSSL_EC_NAMED_CURVE;
ret->asn1_form = POINT_CONVERSION_UNCOMPRESSED;
-
- ret->seed = NULL;
- ret->seed_len = 0;
-
if (!meth->group_init(ret))
goto err;
-
return ret;
+
err:
BN_free(ret->order);
BN_free(ret->cofactor);