Migrate queued_tasks tasks, to avoid dangling pointers
This commit is contained in:
committed by
Martin Willi
parent
0f21ebc81d
commit
7f1eb89517
@@ -1003,6 +1003,13 @@ METHOD(task_manager_t, reset, void,
|
||||
}
|
||||
this->initiating.type = EXCHANGE_TYPE_UNDEFINED;
|
||||
|
||||
/* reset queued tasks */
|
||||
while (this->queued_tasks->remove_last(this->queued_tasks,
|
||||
(void**)&task) == SUCCESS)
|
||||
{
|
||||
task->migrate(task, this->ike_sa);
|
||||
this->queued_tasks->insert_first(this->queued_tasks, task);
|
||||
}
|
||||
/* reset active tasks */
|
||||
while (this->active_tasks->remove_last(this->active_tasks,
|
||||
(void**)&task) == SUCCESS)
|
||||
|
||||
Reference in New Issue
Block a user