pluto: Fixed potential memory leak when processing requested virtual IPs.
This commit is contained in:
+2
-1
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user