]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xshared: Free data after printing help
authorPhil Sutter <phil@nwl.cc>
Fri, 25 Nov 2022 20:47:52 +0000 (21:47 +0100)
committerPhil Sutter <phil@nwl.cc>
Fri, 2 Dec 2022 00:44:17 +0000 (01:44 +0100)
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

index 2a894c19a011d06d0c0ecd0d6c09806d2d533769..f93529b11a3190ba02cc4ccad89dad2951d1c494 100644 (file)
@@ -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);
 
                        /*