From 3fcde74b3877756f4b4725a883d0b48696c0d369 Mon Sep 17 00:00:00 2001 From: Kirill Korotaev Date: Fri, 1 Sep 2006 01:34:10 -0700 Subject: [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: Kirill Korotaev Signed-off-by: David S. Miller --- net/core/neighbour.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'net/core/neighbour.c') diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 5130d2efdbb..fe2113f54e2 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -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; } -- cgit v1.2.3-18-g5258