fixed memleak in rekey collissions
This commit is contained in:
@@ -329,6 +329,7 @@ static void collide(private_child_rekey_t *this, task_t *other)
|
|||||||
if (rekey == NULL || rekey->child_sa != this->child_sa)
|
if (rekey == NULL || rekey->child_sa != this->child_sa)
|
||||||
{
|
{
|
||||||
/* not the same child => no collision */
|
/* not the same child => no collision */
|
||||||
|
other->destroy(other);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -338,12 +339,14 @@ static void collide(private_child_rekey_t *this, task_t *other)
|
|||||||
if (del == NULL || del->get_child(del) != this->child_sa)
|
if (del == NULL || del->get_child(del) != this->child_sa)
|
||||||
{
|
{
|
||||||
/* not the same child => no collision */
|
/* not the same child => no collision */
|
||||||
|
other->destroy(other);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* any other task is not critical for collisisions, ignore */
|
/* any other task is not critical for collisisions, ignore */
|
||||||
|
other->destroy(other);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DESTROY_IF(this->collision);
|
DESTROY_IF(this->collision);
|
||||||
|
|||||||
Reference in New Issue
Block a user