diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/config.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c index 6d09b77644..e68d7ba5f9 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -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. */ |