diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index ca14fb8bd362..d934a6994632 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -793,6 +793,7 @@ check_entry_size_and_hooks(struct ip6t_entry *e, | |||
793 | static int | 793 | static int |
794 | cleanup_entry(struct ip6t_entry *e, unsigned int *i) | 794 | cleanup_entry(struct ip6t_entry *e, unsigned int *i) |
795 | { | 795 | { |
796 | struct xt_tgdtor_param par; | ||
796 | struct ip6t_entry_target *t; | 797 | struct ip6t_entry_target *t; |
797 | 798 | ||
798 | if (i && (*i)-- == 0) | 799 | if (i && (*i)-- == 0) |
@@ -801,9 +802,12 @@ cleanup_entry(struct ip6t_entry *e, unsigned int *i) | |||
801 | /* Cleanup all matches */ | 802 | /* Cleanup all matches */ |
802 | IP6T_MATCH_ITERATE(e, cleanup_match, NULL); | 803 | IP6T_MATCH_ITERATE(e, cleanup_match, NULL); |
803 | t = ip6t_get_target(e); | 804 | t = ip6t_get_target(e); |
804 | if (t->u.kernel.target->destroy) | 805 | |
805 | t->u.kernel.target->destroy(t->u.kernel.target, t->data); | 806 | par.target = t->u.kernel.target; |
806 | module_put(t->u.kernel.target->me); | 807 | par.targinfo = t->data; |
808 | if (par.target->destroy != NULL) | ||
809 | par.target->destroy(&par); | ||
810 | module_put(par.target->me); | ||
807 | return 0; | 811 | return 0; |
808 | } | 812 | } |
809 | 813 | ||