Since another nonce gets allocated later (if any was allocated already)
this would have resulted in a leaked nonce context ID when used in charon-tkm.
*/
static bool generate_nonce(private_child_create_t *this)
{
+ this->nonceg = this->keymat->keymat.create_nonce_gen(&this->keymat->keymat);
if (!this->nonceg)
{
DBG1(DBG_IKE, "no nonce generator found to create nonce");
}
DESTROY_IF(this->child_sa);
DESTROY_IF(this->proposal);
+ DESTROY_IF(this->nonceg);
DESTROY_IF(this->dh);
this->dh_failed = FALSE;
if (this->proposals)
.rekey = rekey,
.retry = FALSE,
);
- this->nonceg = this->keymat->keymat.create_nonce_gen(&this->keymat->keymat);
if (config)
{