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

This commit is contained in:
Tobias Brunner 2011-04-14 15:01:18 +02:00
parent 267d47d6f2
commit 809750d72b
1 changed files with 13 additions and 12 deletions

View File

@ -120,6 +120,7 @@ static void get_attributes(connection_t *c, linked_list_t *ca_list)
int family;
family = (ca->type == INTERNAL_IP4_ADDRESS) ? AF_INET : AF_INET6;
DESTROY_IF(requested_vip);
requested_vip = (ca->value.len) ?
host_create_from_chunk(family, ca->value, 0) :
host_create_any(family);