diff options
author | Roger Dingledine <arma@torproject.org> | 2004-08-18 21:46:53 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-08-18 21:46:53 +0000 |
commit | cf6159abb98ea968d6aa732ba9678dbfdfac7156 (patch) | |
tree | b0e9b8054e87c867f37b732f2c54d7568a1699c0 | |
parent | 8ddc029d07d1a2cd71d2ffb1548f7e0cbca62d90 (diff) | |
download | tor-cf6159abb98ea968d6aa732ba9678dbfdfac7156.tar tor-cf6159abb98ea968d6aa732ba9678dbfdfac7156.tar.gz |
fix a seg fault on hup when FascistFirewall is defined
svn:r2294
-rw-r--r-- | src/or/config.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c index e68d7ba5f..963b4a274 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -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, |