aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6_tables.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 9c843e3777bc..891358e89a2b 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -599,12 +599,16 @@ mark_source_chains(struct xt_table_info *newinfo,
599static int 599static int
600cleanup_match(struct ip6t_entry_match *m, unsigned int *i) 600cleanup_match(struct ip6t_entry_match *m, unsigned int *i)
601{ 601{
602 struct xt_mtdtor_param par;
603
602 if (i && (*i)-- == 0) 604 if (i && (*i)-- == 0)
603 return 1; 605 return 1;
604 606
605 if (m->u.kernel.match->destroy) 607 par.match = m->u.kernel.match;
606 m->u.kernel.match->destroy(m->u.kernel.match, m->data); 608 par.matchinfo = m->data;
607 module_put(m->u.kernel.match->me); 609 if (par.match->destroy != NULL)
610 par.match->destroy(&par);
611 module_put(par.match->me);
608 return 0; 612 return 0;
609} 613}
610 614