pluto: Fixed potential memory leak when processing requested virtual IPs.

This commit is contained in:
Tobias Brunner
2011-04-14 18:10:52 +02:00
parent 267d47d6f2
commit 809750d72b
+2 -1
View File
@@ -120,9 +120,10 @@ static void get_attributes(connection_t *c, linked_list_t *ca_list)
int family; int family;
family = (ca->type == INTERNAL_IP4_ADDRESS) ? AF_INET : AF_INET6; family = (ca->type == INTERNAL_IP4_ADDRESS) ? AF_INET : AF_INET6;
DESTROY_IF(requested_vip);
requested_vip = (ca->value.len) ? requested_vip = (ca->value.len) ?
host_create_from_chunk(family, ca->value, 0) : host_create_from_chunk(family, ca->value, 0) :
host_create_any(family); host_create_any(family);
plog("peer requested virtual IP %H", requested_vip); plog("peer requested virtual IP %H", requested_vip);
break; break;
} }