X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=crypto%2Fec%2Fec_lib.c;h=793645de8ae2780c19db06a2dbc88694513e12a0;hb=64b25758edca688a30f02c260262150f7ad0bc7d;hp=cd08a5553c45ab66b1c6c52209ef87b1b8e30fd9;hpb=fb4844bbc62fb014c115cd8fd2fc4304cba6eb89;p=thirdparty%2Fopenssl.git 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);