Browse Source

Merge remote-tracking branch 'teor/fix-exitpolicy-leak'

Nick Mathewson 8 years ago
parent
commit
6102efbee2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/or/policies.c

+ 3 - 1
src/or/policies.c

@@ -1361,7 +1361,7 @@ policies_parse_exit_policy_from_options(const or_options_t *or_options,
                                         smartlist_t **result)
 {
   exit_policy_parser_cfg_t parser_cfg = 0;
-  smartlist_t *configured_addresses = smartlist_new();
+  smartlist_t *configured_addresses = NULL;
   int rv = 0;
 
   /* Short-circuit for non-exit relays */
@@ -1371,6 +1371,8 @@ policies_parse_exit_policy_from_options(const or_options_t *or_options,
     return 0;
   }
 
+  configured_addresses = smartlist_new();
+
   /* Configure the parser */
   if (or_options->IPv6Exit) {
     parser_cfg |= EXIT_POLICY_IPV6_ENABLED;