ike: Fix memory leak if remote address is kept
authorTobias Brunner <tobias@strongswan.org>
Mon, 27 Jul 2015 17:37:41 +0000 (19:37 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 27 Jul 2015 17:38:59 +0000 (19:38 +0200)
src/libcharon/sa/ike_sa.c

index 752a756..6ffbd55 100644 (file)
@@ -1230,6 +1230,10 @@ static void resolve_hosts(private_ike_sa_t *this)
                         * address family might have changed */
                        set_other_host(this, host);
                }
+               else
+               {
+                       host->destroy(host);
+               }
        }
 
        if (this->local_host)