Avoid a deadlock when installing a trap policy failed
This commit is contained in:
@@ -170,8 +170,8 @@ METHOD(trap_manager_t, install, u_int32_t,
|
|||||||
if (status != SUCCESS)
|
if (status != SUCCESS)
|
||||||
{
|
{
|
||||||
DBG1(DBG_CFG, "installing trap failed");
|
DBG1(DBG_CFG, "installing trap failed");
|
||||||
child_sa->destroy(child_sa);
|
|
||||||
reqid = 0;
|
reqid = 0;
|
||||||
|
/* hold off destroying the CHILD_SA until we released the lock */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -184,6 +184,10 @@ METHOD(trap_manager_t, install, u_int32_t,
|
|||||||
}
|
}
|
||||||
this->lock->unlock(this->lock);
|
this->lock->unlock(this->lock);
|
||||||
|
|
||||||
|
if (status != SUCCESS)
|
||||||
|
{
|
||||||
|
child_sa->destroy(child_sa);
|
||||||
|
}
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
destroy_entry(found);
|
destroy_entry(found);
|
||||||
|
|||||||
Reference in New Issue
Block a user