summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--iptables/ip6tables.c3
-rw-r--r--iptables/iptables.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/iptables/ip6tables.c b/iptables/ip6tables.c
index 1d232657..345af451 100644
--- a/iptables/ip6tables.c
+++ b/iptables/ip6tables.c
@@ -778,7 +778,6 @@ int do_command6(int argc, char *argv[], char **table,
xtables_find_target(cs.jumpto, XTF_LOAD_MUST_SUCCEED);
} else {
e = generate_entry(&cs.fw6, cs.matches, cs.target->t);
- free(cs.target->t);
}
}
@@ -880,7 +879,7 @@ int do_command6(int argc, char *argv[], char **table,
if (verbose > 1)
dump_entries6(*handle);
- xtables_rule_matches_free(&cs.matches);
+ xtables_clear_iptables_command_state(&cs);
if (e != NULL) {
free(e);
diff --git a/iptables/iptables.c b/iptables/iptables.c
index d246198f..6f7b3476 100644
--- a/iptables/iptables.c
+++ b/iptables/iptables.c
@@ -773,7 +773,6 @@ int do_command4(int argc, char *argv[], char **table,
xtables_find_target(cs.jumpto, XTF_LOAD_MUST_SUCCEED);
} else {
e = generate_entry(&cs.fw, cs.matches, cs.target->t);
- free(cs.target->t);
}
}
@@ -875,7 +874,7 @@ int do_command4(int argc, char *argv[], char **table,
if (verbose > 1)
dump_entries(*handle);
- xtables_rule_matches_free(&cs.matches);
+ xtables_clear_iptables_command_state(&cs);
if (e != NULL) {
free(e);