From: Nick Mathewson Date: Wed, 5 Jan 2005 02:51:04 +0000 (+0000) Subject: Remove broken and undocumented wart where multiple CSV config lines are appended... X-Git-Tag: tor-0.1.0.1-rc~511 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e99f79fa4d709b4d714e641d180b14c89ec0f7e1;p=thirdparty%2Ftor.git Remove broken and undocumented wart where multiple CSV config lines are appended rather than replaced. Resolves bug #49 svn:r3301 --- 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);