diff options
author | Kirill Korotaev <dev@openvz.org> | 2006-09-01 04:34:10 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-18 02:21:01 -0400 |
commit | 3fcde74b3877756f4b4725a883d0b48696c0d369 (patch) | |
tree | afadd7d4d1a3b01f0941b8e1039bad6b2ba222af /net/core | |
parent | 803db244b9f71102e366fd689000c1417b9a7508 (diff) |
[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 <dev@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/neighbour.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 5130d2efdbbe..fe2113f54e2b 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1432,6 +1432,9 @@ int neigh_table_clear(struct neigh_table *tbl) | |||
1432 | kfree(tbl->phash_buckets); | 1432 | kfree(tbl->phash_buckets); |
1433 | tbl->phash_buckets = NULL; | 1433 | tbl->phash_buckets = NULL; |
1434 | 1434 | ||
1435 | free_percpu(tbl->stats); | ||
1436 | tbl->stats = NULL; | ||
1437 | |||
1435 | return 0; | 1438 | return 0; |
1436 | } | 1439 | } |
1437 | 1440 | ||