]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
trap-manager: Also clean up remote address in error cases
authorTobias Brunner <tobias@strongswan.org>
Tue, 10 Nov 2015 13:00:11 +0000 (14:00 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 10 Nov 2015 13:00:11 +0000 (14:00 +0100)
Fixes #1201.

src/libcharon/sa/trap_manager.c

index 63505c96038550eab3b2546840122d4c32f0d767..90ad7e40e7456fb33df09b6d9dd4085a697ca720 100644 (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;
                }