Avoid segfault when freeing options_t without firewall_ports

svn:r2279
This commit is contained in:
Nick Mathewson 2004-08-18 07:06:53 +00:00
parent 285032ce0f
commit 555f8f30f4

View File

@ -545,8 +545,10 @@ static void free_options(or_options_t *options) {
config_free_lines(options->DirBindAddress);
config_free_lines(options->ExitPolicy);
config_free_lines(options->SocksPolicy);
if (options->FirewallPorts) {
SMARTLIST_FOREACH(options->FirewallPorts, char *, cp, tor_free(cp));
smartlist_free(options->FirewallPorts);
}
}
/** Set <b>options</b> to hold reasonable defaults for most options. */