diff mbox series

[iptables,8/9] xshared: Free data after printing help

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

Commit Message

Phil Sutter Nov. 30, 2022, 7:13 p.m. UTC
This is merely to make valgrind happy, but less noise means less real
issues missed.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 iptables/xshared.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/iptables/xshared.c b/iptables/xshared.c
index 2a894c19a011d..f93529b11a319 100644
--- a/iptables/xshared.c
+++ b/iptables/xshared.c
@@ -1543,6 +1543,9 @@  void do_parse(int argc, char *argv[],
 					XTF_TRY_LOAD, &cs->matches);
 
 			xtables_printhelp(cs->matches);
+			xtables_clear_iptables_command_state(cs);
+			xtables_free_opts(1);
+			xtables_fini();
 			exit(0);
 
 			/*