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:
@@ -1372,6 +1372,7 @@ static void process_route(private_kernel_netlink_net_t *this,
|
|||||||
if (RTA_PAYLOAD(rta) == sizeof(uint32_t) &&
|
if (RTA_PAYLOAD(rta) == sizeof(uint32_t) &&
|
||||||
this->routing_table == *(uint32_t*)RTA_DATA(rta))
|
this->routing_table == *(uint32_t*)RTA_DATA(rta))
|
||||||
{
|
{
|
||||||
|
DESTROY_IF(host);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user