aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6_tables.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 2453dfdc91aa..6fabb73ff445 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -2121,12 +2121,15 @@ void ip6t_unregister_table(struct xt_table *table)
2121{ 2121{
2122 struct xt_table_info *private; 2122 struct xt_table_info *private;
2123 void *loc_cpu_entry; 2123 void *loc_cpu_entry;
2124 struct module *table_owner = table->me;
2124 2125
2125 private = xt_unregister_table(table); 2126 private = xt_unregister_table(table);
2126 2127
2127 /* Decrease module usage counts and free resources */ 2128 /* Decrease module usage counts and free resources */
2128 loc_cpu_entry = private->entries[raw_smp_processor_id()]; 2129 loc_cpu_entry = private->entries[raw_smp_processor_id()];
2129 IP6T_ENTRY_ITERATE(loc_cpu_entry, private->size, cleanup_entry, NULL); 2130 IP6T_ENTRY_ITERATE(loc_cpu_entry, private->size, cleanup_entry, NULL);
2131 if (private->number > private->initial_entries)
2132 module_put(table_owner);
2130 xt_free_table_info(private); 2133 xt_free_table_info(private);
2131} 2134}
2132 2135