From 381b5569eb256e13346cff902d6ceed42cb441ad Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 5 May 2020 19:36:13 +0200 Subject: 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 --- iptables/nft-ipv4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iptables/nft-ipv4.c') diff --git a/iptables/nft-ipv4.c b/iptables/nft-ipv4.c index 70634f8f..69691fe2 100644 --- a/iptables/nft-ipv4.c +++ b/iptables/nft-ipv4.c @@ -288,7 +288,7 @@ static void nft_ipv4_print_rule(struct nft_handle *h, struct nftnl_rule *r, if (!(format & FMT_NONEWLINE)) fputc('\n', stdout); - xtables_rule_matches_free(&cs.matches); + nft_clear_iptables_command_state(&cs); } static void save_ipv4_addr(char letter, const struct in_addr *addr, -- cgit v1.2.3