netfilter: nf_conntrack: fix sysctl memory leak
authorStephen Hemminger <shemminger@vyatta.com>
Mon, 14 Mar 2011 18:20:44 +0000 (19:20 +0100)
committerPatrick McHardy <kaber@trash.net>
Mon, 14 Mar 2011 18:20:44 +0000 (19:20 +0100)
Message in log because sysctl table was not empty at netns exit
 WARNING: at net/sysctl_net.c:84 sysctl_net_exit+0x2a/0x2c()

Instrumenting showed that the nf_conntrack_timestamp was the entry
that was being created but not cleared.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/nf_conntrack_core.c

index 1909311c392a6f55cb59147795ed9c16111600a9..118123606a2177ae29a5e6e34f3bb22b548d052f 100644 (file)
@@ -1294,6 +1294,7 @@ static void nf_conntrack_cleanup_net(struct net *net)
 
        nf_ct_free_hashtable(net->ct.hash, net->ct.htable_size);
        nf_conntrack_ecache_fini(net);
+       nf_conntrack_tstamp_fini(net);
        nf_conntrack_acct_fini(net);
        nf_conntrack_expect_fini(net);
        kmem_cache_destroy(net->ct.nf_conntrack_cachep);