summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-08-18 21:46:53 +0000
committerRoger Dingledine <arma@torproject.org>2004-08-18 21:46:53 +0000
commitcf6159abb98ea968d6aa732ba9678dbfdfac7156 (patch)
treeb0e9b8054e87c867f37b732f2c54d7568a1699c0
parent8ddc029d07d1a2cd71d2ffb1548f7e0cbca62d90 (diff)
downloadtor-cf6159abb98ea968d6aa732ba9678dbfdfac7156.tar.gz
tor-cf6159abb98ea968d6aa732ba9678dbfdfac7156.zip
fix a seg fault on hup when FascistFirewall is defined
svn:r2294
-rw-r--r--src/or/config.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c
index e68d7ba5f9..963b4a2746 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,