mbox series

[iptables,0/9] Fix for shell testsuite '-V' option

Message ID 20221130191345.14543-1-phil@nwl.cc
Headers show
Series Fix for shell testsuite '-V' option | expand

Message

Phil Sutter Nov. 30, 2022, 7:13 p.m. UTC
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(-)

Comments

Phil Sutter Dec. 2, 2022, 12:46 a.m. UTC | #1
On Wed, Nov 30, 2022 at 08:13:36PM +0100, Phil Sutter wrote:
> 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

Series applied.