From e8f2c13f9a80c53f4fae15119c5d2cdafb08726b Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 10 Nov 2015 14:00:11 +0100 Subject: trap-manager: Also clean up remote address in error cases Fixes #1201. --- src/libcharon/sa/trap_manager.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/libcharon/sa/trap_manager.c b/src/libcharon/sa/trap_manager.c index 63505c960..90ad7e40e 100644 --- a/src/libcharon/sa/trap_manager.c +++ b/src/libcharon/sa/trap_manager.c @@ -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; } -- cgit v1.2.3