Commit cf6159ab authored by Roger Dingledine's avatar Roger Dingledine
Browse files

fix a seg fault on hup when FascistFirewall is defined


svn:r2294
parent 8ddc029d
......@@ -548,6 +548,7 @@ static void free_options(or_options_t *options) {
if (options->FirewallPorts) {
SMARTLIST_FOREACH(options->FirewallPorts, char *, cp, tor_free(cp));
smartlist_free(options->FirewallPorts);
options->FirewallPorts = NULL;
}
}
......@@ -800,8 +801,8 @@ int getconfig(int argc, char **argv, or_options_t *options) {
if(options->FascistFirewall && !options->FirewallPorts) {
options->FirewallPorts = smartlist_create();
smartlist_add(options->FirewallPorts, "80");
smartlist_add(options->FirewallPorts, "443");
smartlist_add(options->FirewallPorts, tor_strdup("80"));
smartlist_add(options->FirewallPorts, tor_strdup("443"));
}
if(options->FirewallPorts) {
SMARTLIST_FOREACH(options->FirewallPorts, const char *, cp,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment