mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Avoid segfault when freeing options_t without firewall_ports
svn:r2279
This commit is contained in:
parent
285032ce0f
commit
555f8f30f4
@ -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);
|
||||
SMARTLIST_FOREACH(options->FirewallPorts, char *, cp, tor_free(cp));
|
||||
smartlist_free(options->FirewallPorts);
|
||||
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. */
|
||||
|
Loading…
Reference in New Issue
Block a user