summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bridge/br_netfilter_hooks.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c
index 995a498534e9..8a4bbc171b76 100644
--- a/net/bridge/br_netfilter_hooks.c
+++ b/net/bridge/br_netfilter_hooks.c
@@ -1120,9 +1120,11 @@ static int br_netfilter_sysctl_init_net(struct net *net)
static void br_netfilter_sysctl_exit_net(struct net *net,
struct brnf_net *brnet)
{
+ struct ctl_table *table = brnet->ctl_hdr->ctl_table_arg;
+
unregister_net_sysctl_table(brnet->ctl_hdr);
if (!net_eq(net, &init_net))
- kfree(brnet->ctl_hdr->ctl_table_arg);
+ kfree(table);
}
static int __net_init brnf_init_net(struct net *net)