diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ip_tables.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 4147298a6a81..12ad4d5c55d6 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
@@ -576,12 +576,16 @@ mark_source_chains(struct xt_table_info *newinfo, | |||
576 | static int | 576 | static int |
577 | cleanup_match(struct ipt_entry_match *m, unsigned int *i) | 577 | cleanup_match(struct ipt_entry_match *m, unsigned int *i) |
578 | { | 578 | { |
579 | struct xt_mtdtor_param par; | ||
580 | |||
579 | if (i && (*i)-- == 0) | 581 | if (i && (*i)-- == 0) |
580 | return 1; | 582 | return 1; |
581 | 583 | ||
582 | if (m->u.kernel.match->destroy) | 584 | par.match = m->u.kernel.match; |
583 | m->u.kernel.match->destroy(m->u.kernel.match, m->data); | 585 | par.matchinfo = m->data; |
584 | module_put(m->u.kernel.match->me); | 586 | if (par.match->destroy != NULL) |
587 | par.match->destroy(&par); | ||
588 | module_put(par.match->me); | ||
585 | return 0; | 589 | return 0; |
586 | } | 590 | } |
587 | 591 | ||