When running the testsuite in "valgrind mode", numerous cases of lost memory and still reachable at program exit are reported. Address them all plus libiptc's access of uninitialized memory. Phil Sutter (9): tests: shell: Fix valgrind mode for 0008-unprivileged_0 iptables-restore: Free handle with --test also iptables-xml: Free allocated chain strings nft: Plug memleak in nft_rule_zero_counters() iptables: Plug memleaks in print_firewall() xtables: Introduce xtables_clear_iptables_command_state() iptables: Properly clear iptables_command_state object xshared: Free data after printing help libiptc: Eliminate garbage access iptables/ip6tables.c | 9 +++++++-- iptables/iptables-restore.c | 4 ++-- iptables/iptables-xml.c | 10 +++++----- iptables/iptables.c | 9 +++++++-- iptables/nft-arp.c | 4 ++-- iptables/nft-ipv4.c | 4 ++-- iptables/nft-ipv6.c | 4 ++-- iptables/nft-shared.c | 14 -------------- iptables/nft-shared.h | 1 - iptables/nft.c | 5 +++-- iptables/tests/shell/run-tests.sh | 3 ++- iptables/xshared.c | 20 ++++++++++++++++++++ iptables/xshared.h | 2 ++ iptables/xtables-translate.c | 2 +- iptables/xtables.c | 2 +- libiptc/libiptc.c | 4 ++-- 16 files changed, 58 insertions(+), 39 deletions(-) -- 2.38.0