mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 06:48:05 +01:00
Avoid segfault when freeing options_t without firewall_ports
svn:r2279
This commit is contained in:
parent
285032ce0f
commit
555f8f30f4
1 changed files with 4 additions and 2 deletions
|
@ -545,8 +545,10 @@ static void free_options(or_options_t *options) {
|
||||||
config_free_lines(options->DirBindAddress);
|
config_free_lines(options->DirBindAddress);
|
||||||
config_free_lines(options->ExitPolicy);
|
config_free_lines(options->ExitPolicy);
|
||||||
config_free_lines(options->SocksPolicy);
|
config_free_lines(options->SocksPolicy);
|
||||||
SMARTLIST_FOREACH(options->FirewallPorts, char *, cp, tor_free(cp));
|
if (options->FirewallPorts) {
|
||||||
smartlist_free(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. */
|
/** Set <b>options</b> to hold reasonable defaults for most options. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue