]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
trap-manager: fix a memleak when installing a trap to %any
authorMartin Willi <martin@revosec.ch>
Wed, 5 Jun 2013 12:36:44 +0000 (14:36 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 19 Jun 2013 14:30:40 +0000 (16:30 +0200)
src/libcharon/sa/trap_manager.c

index 6c0ae19c703d1975327b2921a5a2b615f270c7f7..7a4567cdfc55b8e16caef07d7b0c217ddbc54432 100644 (file)
@@ -109,6 +109,7 @@ METHOD(trap_manager_t, install, u_int32_t,
                                                                 0, ike_cfg->get_other_port(ike_cfg));
        if (!other || other->is_anyaddr(other))
        {
+               DESTROY_IF(other);
                DBG1(DBG_CFG, "installing trap failed, remote address unknown");
                return 0;
        }