]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
arptables: Fix leak in nft_arp_print_rule()
authorPhil Sutter <phil@nwl.cc>
Wed, 6 May 2020 10:27:49 +0000 (12:27 +0200)
committerPhil Sutter <phil@nwl.cc>
Mon, 11 May 2020 12:28:29 +0000 (14:28 +0200)
The function missed to clear struct iptables_command_state again after
use.

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/nft-arp.c

index e9a2d9de21560631738be5237df32bbab3df2e65..9a831efd07a28e4d24fe0fc8ee137e3dc3374a1c 100644 (file)
@@ -604,6 +604,8 @@ nft_arp_print_rule(struct nft_handle *h, struct nftnl_rule *r,
 
        if (!(format & FMT_NONEWLINE))
                fputc('\n', stdout);
+
+       nft_clear_iptables_command_state(&cs);
 }
 
 static bool nft_arp_is_same(const void *data_a,