quick-delete: Correctly maintain allocated reqid when recreating CHILD_SA

This commit is contained in:
Tobias Brunner 2023-10-02 16:10:40 +02:00
parent c923022733
commit f9a9188a36

View File

@ -151,7 +151,7 @@ static status_t delete_child(private_quick_delete_t *this,
if (remote_close)
{
child_init_args_t args = {
.reqid = child_sa->get_reqid(child_sa),
.reqid = child_sa->get_reqid_ref(child_sa),
};
action_t action;
@ -169,6 +169,10 @@ static status_t delete_child(private_quick_delete_t *this,
child_cfg->get_ref(child_cfg);
status = this->ike_sa->initiate(this->ike_sa, child_cfg, &args);
}
if (args.reqid)
{
charon->kernel->release_reqid(charon->kernel, args.reqid);
}
child_cfg->destroy(child_cfg);
}
}