提交 3fcde74b 编写于 作者: K Kirill Korotaev 提交者: David S. Miller

[NEIGH]: neigh_table_clear() doesn't free stats

neigh_table_clear() doesn't free tbl->stats.
Found by Alexey Kuznetsov. Though Alexey considers this
leak minor for mainstream, I still believe that cleanup
code should not forget to free some of the resources :)

At least, this is critical for OpenVZ with virtualized
neighbour tables.
Signed-Off-By: NKirill Korotaev <dev@openvz.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 803db244
......@@ -1432,6 +1432,9 @@ int neigh_table_clear(struct neigh_table *tbl)
kfree(tbl->phash_buckets);
tbl->phash_buckets = NULL;
free_percpu(tbl->stats);
tbl->stats = NULL;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册