summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-arp.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2020-05-05 19:36:13 +0200
committerPhil Sutter <phil@nwl.cc>2020-05-11 14:28:29 +0200
commit381b5569eb256e13346cff902d6ceed42cb441ad (patch)
tree8ee3df5933b5ca75799eb83376b9e0df690a4cc4 /iptables/xtables-arp.c
parent7db4333dc0b6cd8e943fab78d6dab40ff9f4512e (diff)
nft: Use clear_cs() instead of open coding
In a few places, initialized struct iptables_command_state was not fully deinitialized. Change them to call nft_clear_iptables_command_state() which does it properly. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xtables-arp.c')
-rw-r--r--iptables/xtables-arp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c
index a0136059..e64938fb 100644
--- a/iptables/xtables-arp.c
+++ b/iptables/xtables-arp.c
@@ -1019,9 +1019,7 @@ int do_commandarp(struct nft_handle *h, int argc, char *argv[], char **table,
free(daddrs);
free(dmasks);
- if (cs.target)
- free(cs.target->t);
-
+ nft_clear_iptables_command_state(&cs);
xtables_free_opts(1);
/* if (verbose > 1)