[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Backport fix for bug 49
Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv25822
Modified Files:
Tag: tor-0_0_9-patches
config.c
Log Message:
Backport fix for bug 49
Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.286.2.1
retrieving revision 1.286.2.2
diff -u -d -r1.286.2.1 -r1.286.2.2
--- config.c 3 Jan 2005 23:22:01 -0000 1.286.2.1
+++ config.c 5 Jan 2005 02:58:05 -0000 1.286.2.2
@@ -585,8 +585,12 @@
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);