summaryrefslogtreecommitdiffstats
path: root/iptables
diff options
context:
space:
mode:
Diffstat (limited to 'iptables')
-rw-r--r--iptables/xtables.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/iptables/xtables.c b/iptables/xtables.c
index 946f04d6..3e6092f2 100644
--- a/iptables/xtables.c
+++ b/iptables/xtables.c
@@ -600,27 +600,6 @@ list_rules(struct nft_handle *h, const char *chain, const char *table,
return 1;
}
-static void clear_rule_matches(struct xtables_rule_match **matches)
-{
- struct xtables_rule_match *matchp, *tmp;
-
- for (matchp = *matches; matchp;) {
- tmp = matchp->next;
- if (matchp->match->m) {
- free(matchp->match->m);
- matchp->match->m = NULL;
- }
- if (matchp->match == matchp->match->next) {
- free(matchp->match);
- matchp->match = NULL;
- }
- free(matchp);
- matchp = tmp;
- }
-
- *matches = NULL;
-}
-
static void command_jump(struct iptables_command_state *cs)
{
size_t size;
@@ -1245,7 +1224,7 @@ int do_commandx(struct nft_handle *h, int argc, char *argv[], char **table)
/* if (verbose > 1)
dump_entries(*handle); */
- clear_rule_matches(&cs.matches);
+ xtables_rule_matches_free(&cs.matches);
if (h->family == AF_INET) {
free(args.s.addr.v4);