]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove broken and undocumented wart where multiple CSV config lines are appended...
authorNick Mathewson <nickm@torproject.org>
Wed, 5 Jan 2005 02:51:04 +0000 (02:51 +0000)
committerNick Mathewson <nickm@torproject.org>
Wed, 5 Jan 2005 02:51:04 +0000 (02:51 +0000)
svn:r3301

src/or/config.c

index 284afe5e09ae8578f158fef15b910e6c5cffd393..c5699b427dc297a799567b345312cdbfc6ee331f 100644 (file)
@@ -583,8 +583,12 @@ config_assign_line(or_options_t *options, struct config_line_t *c, int reset)
     break;
 
   case CONFIG_TYPE_CSV:
-    if (*(smartlist_t**)lvalue == NULL)
+    if (*(smartlist_t**)lvalue) {
+      SMARTLIST_FOREACH(*(smartlist_t**)lvalue, char *, cp, tor_free(cp));
+      smartlist_clear(*(smartlist_t**)lvalue);
+    } else {
       *(smartlist_t**)lvalue = smartlist_create();
+    }
 
     smartlist_split_string(*(smartlist_t**)lvalue, c->value, ",",
                            SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);