aboutsummaryrefslogtreecommitdiff
path: root/crypto/ec/ec_lib.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2015-09-03 09:15:26 -0400
committerRich Salz <rsalz@openssl.org>2015-09-03 16:26:34 -0400
commit64b25758edca688a30f02c260262150f7ad0bc7d (patch)
tree15ad5a8c7985e2b27aaf7a14737fd980a36349dd /crypto/ec/ec_lib.c
parentfb4844bbc62fb014c115cd8fd2fc4304cba6eb89 (diff)
downloadopenssl-64b25758edca688a30f02c260262150f7ad0bc7d.zip
openssl-64b25758edca688a30f02c260262150f7ad0bc7d.tar.gz
openssl-64b25758edca688a30f02c260262150f7ad0bc7d.tar.bz2
remove 0 assignments.
After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson <tjh@openssl.org>
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 cd08a55..793645d 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);