[server] if iptables init fails then no need to remove fwknop chains

This commit fixes a crash at init time in fwknopd if an improperly formatted
IPT_INPUT_ACCESS variable is used in fwknopd.conf file.  fwknopd should not
try to delete chains with a bogus IPT_INPUT_ACCESS variable, and valgrind
verifies that this change does not introduce any memory leaks (see the
'invalid iptables INPUT spec' tests run in --enable-valgrind mode).
This commit is contained in:
Michael Rash
2013-08-04 23:01:33 -04:00
parent a7030b038a
commit 39fa4cc012
+1 -1
View File
@@ -182,7 +182,7 @@ main(int argc, char **argv)
* of an existing fwknopd process.
*/
if(fw_config_init(&opts) != 1)
clean_exit(&opts, FW_CLEANUP, EXIT_FAILURE);
clean_exit(&opts, NO_FW_CLEANUP, EXIT_FAILURE);
if(opts.fw_list == 1 || opts.fw_list_all == 1)
{