trap-manager: Also clean up remote address in error cases

Fixes #1201.
This commit is contained in:
Tobias Brunner
2015-11-10 14:00:11 +01:00
parent ebeb8c87c5
commit e8f2c13f9a
+2
View File
@@ -211,6 +211,7 @@ METHOD(trap_manager_t, install, u_int32_t,
if (this->installing == INSTALL_DISABLED)
{ /* flush() has been called */
this->lock->unlock(this->lock);
other->destroy(other);
me->destroy(me);
return 0;
}
@@ -235,6 +236,7 @@ METHOD(trap_manager_t, install, u_int32_t,
{
DBG1(DBG_CFG, "CHILD_SA '%s' is already being routed", found->name);
this->lock->unlock(this->lock);
other->destroy(other);
me->destroy(me);
return 0;
}