netfilter: xtables: move extension arguments into compound structure (3/6)
This patch does this for match extensions' destroy functions. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
committed by
Patrick McHardy
parent
9b4fce7a35
commit
6be3d8598e
@@ -599,12 +599,16 @@ mark_source_chains(struct xt_table_info *newinfo,
|
||||
static int
|
||||
cleanup_match(struct ip6t_entry_match *m, unsigned int *i)
|
||||
{
|
||||
struct xt_mtdtor_param par;
|
||||
|
||||
if (i && (*i)-- == 0)
|
||||
return 1;
|
||||
|
||||
if (m->u.kernel.match->destroy)
|
||||
m->u.kernel.match->destroy(m->u.kernel.match, m->data);
|
||||
module_put(m->u.kernel.match->me);
|
||||
par.match = m->u.kernel.match;
|
||||
par.matchinfo = m->data;
|
||||
if (par.match->destroy != NULL)
|
||||
par.match->destroy(&par);
|
||||
module_put(par.match->me);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user