fixed potential segfault in resolve_hosts

This commit is contained in:
Martin Willi
2008-07-17 11:06:31 +00:00
parent d61d1913e1
commit 5353f22ed7
+3
View File
@@ -1058,8 +1058,11 @@ static void resolve_hosts(private_ike_sa_t *this)
host->destroy(host);
host = charon->kernel_interface->get_source_addr(
charon->kernel_interface, this->other_host);
if (host)
{
host->set_port(host, IKEV2_UDP_PORT);
}
}
if (host)
{
set_my_host(this, host);