summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-01-05 02:51:04 +0000
committerNick Mathewson <nickm@torproject.org>2005-01-05 02:51:04 +0000
commite99f79fa4d709b4d714e641d180b14c89ec0f7e1 (patch)
tree1570a641698373c629ad0db7753ef9eed72f55a5 /src/or/config.c
parentf6b0032c316756b2673ab7d9b772516f44c96668 (diff)
downloadtor-e99f79fa4d709b4d714e641d180b14c89ec0f7e1.tar.gz
tor-e99f79fa4d709b4d714e641d180b14c89ec0f7e1.zip
Remove broken and undocumented wart where multiple CSV config lines are appended rather than replaced. Resolves bug #49
svn:r3301
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 284afe5e09..c5699b427d 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -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);