Browse Source

Merge remote-tracking branch 'public/bug7816_023'

Nick Mathewson 11 years ago
parent
commit
5f29bc71b3
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/or/config.c

+ 4 - 1
src/or/config.c

@@ -606,9 +606,12 @@ set_options(or_options_t *new_val, char **msg)
                                           var_name, 1);
 
         if (line) {
-          for (; line; line = line->next) {
+          config_line_t *next;
+          for (; line; line = next) {
+            next = line->next;
             smartlist_add(elements, line->key);
             smartlist_add(elements, line->value);
+            tor_free(line);
           }
         } else {
           smartlist_add(elements, (char*)options_format.vars[i].name);