diff options
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/netfilter/ebtables.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index 5ce37b2f5b84..0320b5203624 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c | |||
@@ -558,12 +558,16 @@ ebt_get_udc_positions(struct ebt_entry *e, struct ebt_table_info *newinfo, | |||
558 | static inline int | 558 | static inline int |
559 | ebt_cleanup_match(struct ebt_entry_match *m, unsigned int *i) | 559 | ebt_cleanup_match(struct ebt_entry_match *m, unsigned int *i) |
560 | { | 560 | { |
561 | struct xt_mtdtor_param par; | ||
562 | |||
561 | if (i && (*i)-- == 0) | 563 | if (i && (*i)-- == 0) |
562 | return 1; | 564 | return 1; |
563 | if (m->u.match->destroy) | ||
564 | m->u.match->destroy(m->u.match, m->data); | ||
565 | module_put(m->u.match->me); | ||
566 | 565 | ||
566 | par.match = m->u.match; | ||
567 | par.matchinfo = m->data; | ||
568 | if (par.match->destroy != NULL) | ||
569 | par.match->destroy(&par); | ||
570 | module_put(par.match->me); | ||
567 | return 0; | 571 | return 0; |
568 | } | 572 | } |
569 | 573 | ||
@@ -609,7 +613,7 @@ ebt_check_entry(struct ebt_entry *e, struct ebt_table_info *newinfo, | |||
609 | unsigned int i, j, hook = 0, hookmask = 0; | 613 | unsigned int i, j, hook = 0, hookmask = 0; |
610 | size_t gap; | 614 | size_t gap; |
611 | int ret; | 615 | int ret; |
612 | struct xt_mtchk_param par; | 616 | struct xt_mtchk_param mtpar; |
613 | 617 | ||
614 | /* don't mess with the struct ebt_entries */ | 618 | /* don't mess with the struct ebt_entries */ |
615 | if (e->bitmask == 0) | 619 | if (e->bitmask == 0) |
@@ -651,10 +655,10 @@ ebt_check_entry(struct ebt_entry *e, struct ebt_table_info *newinfo, | |||
651 | } | 655 | } |
652 | i = 0; | 656 | i = 0; |
653 | 657 | ||
654 | par.table = name; | 658 | mtpar.table = name; |
655 | par.entryinfo = e; | 659 | mtpar.entryinfo = e; |
656 | par.hook_mask = hookmask; | 660 | mtpar.hook_mask = hookmask; |
657 | ret = EBT_MATCH_ITERATE(e, ebt_check_match, &par, &i); | 661 | ret = EBT_MATCH_ITERATE(e, ebt_check_match, &mtpar, &i); |
658 | if (ret != 0) | 662 | if (ret != 0) |
659 | goto cleanup_matches; | 663 | goto cleanup_matches; |
660 | j = 0; | 664 | j = 0; |