kernel-netlink: Fix theoretical memory leak when parsing routes

This currently can't happen as the kernel always puts RTA_TABLE as first
attribute in RTM_NEWROUTE messages.
This commit is contained in:
Tobias Brunner 2021-06-25 13:51:44 +02:00
parent f6aafb3005
commit 06e11b481b
1 changed files with 1 additions and 0 deletions

View File

@ -1372,6 +1372,7 @@ static void process_route(private_kernel_netlink_net_t *this,
if (RTA_PAYLOAD(rta) == sizeof(uint32_t) &&
this->routing_table == *(uint32_t*)RTA_DATA(rta))
{
DESTROY_IF(host);
return;
}
break;