fib: Fix fib zone and its hash leak on namespace stop
When we stop a namespace we flush the table and free one, but the added fn_zone-s (and their hashes if grown) are leaked. Need to free. Tries releases all its stuff in the flushing code. Shame on us - this bug exists since the very first make-fib-per-net patches in 2.6.27 :( Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
b1424ed910
commit
4aa2c466a7
@@ -1052,7 +1052,7 @@ static void ip_fib_net_exit(struct net *net)
|
||||
hlist_for_each_entry_safe(tb, node, tmp, head, tb_hlist) {
|
||||
hlist_del(node);
|
||||
fib_table_flush(tb);
|
||||
kfree(tb);
|
||||
fib_free_table(tb);
|
||||
}
|
||||
}
|
||||
kfree(net->ipv4.fib_table_hash);
|
||||
|
Reference in New Issue
Block a user