Fixed potential memory leak when processing routes from the kernel.

This commit is contained in:
Tobias Brunner 2011-04-14 15:14:55 +02:00
parent 29388829fa
commit 862ef49f85
1 changed files with 1 additions and 0 deletions

View File

@ -534,6 +534,7 @@ static void process_route(private_kernel_netlink_net_t *this, struct nlmsghdr *h
switch (rta->rta_type)
{
case RTA_PREFSRC:
DESTROY_IF(host);
host = host_create_from_chunk(msg->rtm_family,
chunk_create(RTA_DATA(rta), RTA_PAYLOAD(rta)), 0);
break;