child-delete: Correctly maintain allocated reqid when recreating CHILD_SA
The old CHILD_SA is destroyed even before the new task is queued, this makes sure we always maintain a reference to the reqid.
This commit is contained in:
@@ -366,7 +366,7 @@ static status_t destroy_and_reestablish(private_child_delete_t *this)
|
||||
spi = child_sa->get_spi(child_sa, TRUE);
|
||||
child_cfg = child_sa->get_config(child_sa);
|
||||
child_cfg->get_ref(child_cfg);
|
||||
args.reqid = child_sa->get_reqid(child_sa);
|
||||
args.reqid = child_sa->get_reqid_ref(child_sa);
|
||||
args.label = child_sa->get_label(child_sa);
|
||||
if (args.label)
|
||||
{
|
||||
@@ -391,6 +391,10 @@ static status_t destroy_and_reestablish(private_child_delete_t *this)
|
||||
}
|
||||
}
|
||||
child_cfg->destroy(child_cfg);
|
||||
if (args.reqid)
|
||||
{
|
||||
charon->kernel->release_reqid(charon->kernel, args.reqid);
|
||||
}
|
||||
DESTROY_IF(args.label);
|
||||
if (status != SUCCESS)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user