Reviewed-by: Rich Salz <rsalz@openssl.org>
/* throw away old precomputation */
EC_nistp224_pre_comp_free(group->pre_comp.nistp224);
+ group->pre_comp.nistp224 = NULL;
if (ctx == NULL)
if ((ctx = new_ctx = BN_CTX_new()) == NULL)
return 0;
/* throw away old precomputation */
EC_nistp256_pre_comp_free(group->pre_comp.nistp256);
+ group->pre_comp.nistp256 = NULL;
if (ctx == NULL)
if ((ctx = new_ctx = BN_CTX_new()) == NULL)
return 0;
/* throw away old precomputation */
EC_nistp521_pre_comp_free(group->pre_comp.nistp521);
+ group->pre_comp.nistp521 = NULL;
if (ctx == NULL)
if ((ctx = new_ctx = BN_CTX_new()) == NULL)
return 0;
/* if there is an old NISTZ256_PRE_COMP object, throw it away */
EC_nistz256_pre_comp_free(group->pre_comp.nistz256);
+ group->pre_comp.nistz256 = NULL;
generator = EC_GROUP_get0_generator(group);
if (generator == NULL) {
ECerr(EC_F_ECP_NISTZ256_MULT_PRECOMPUTE, EC_R_UNDEFINED_GENERATOR);