]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge remote-tracking branch 'public/bug7816_023'
authorNick Mathewson <nickm@torproject.org>
Mon, 11 Feb 2013 21:14:17 +0000 (16:14 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 11 Feb 2013 21:14:17 +0000 (16:14 -0500)
1  2 
src/or/config.c

diff --cc src/or/config.c
index 0f8441b18303e39f50ad76233e745c708106a3b6,16eadf917b290ff713205333312fc92a602e0933..7ca20e46b4930bb30f47d373c369552fb3d7b20f
@@@ -601,14 -773,16 +601,17 @@@ set_options(or_options_t *new_val, cha
            var->type == CONFIG_TYPE_OBSOLETE) {
          continue;
        }
 -      if (!option_is_same(&options_format, new_val, old_options, var_name)) {
 -        line = get_assigned_option(&options_format, new_val, var_name, 1);
 +      if (!config_is_same(&options_format, new_val, old_options, var_name)) {
 +        line = config_get_assigned_option(&options_format, new_val,
 +                                          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);