Commit 555f8f30 authored by Nick Mathewson's avatar Nick Mathewson 🐘
Browse files

Avoid segfault when freeing options_t without firewall_ports


svn:r2279
parent 285032ce
Loading
Loading
Loading
Loading
+2 −0
Changes for src/or/config.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -545,9 +545,11 @@ static void free_options(or_options_t *options) {
  config_free_lines(options->DirBindAddress);
  config_free_lines(options->ExitPolicy);
  config_free_lines(options->SocksPolicy);
  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. */
static void init_options(or_options_t *options) {