[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Fix memory leak
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv9058/src/or
Modified Files:
routerlist.c
Log Message:
Fix memory leak
Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routerlist.c,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -d -r1.162 -r1.163
--- routerlist.c 15 Oct 2004 20:52:09 -0000 1.162
+++ routerlist.c 16 Oct 2004 08:39:56 -0000 1.163
@@ -329,8 +329,10 @@
nickname_list = smartlist_create();
smartlist_split_string(nickname_list, list, ",",
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
- SMARTLIST_FOREACH(nickname_list, char *, cp,
+ SMARTLIST_FOREACH(nickname_list, const char *, cp,
if (router_nickname_matches(router, cp)) {v=1;break;});
+ SMARTLIST_FOREACH(nickname_list, char *, cp, tor_free(cp));
+ smartlist_free(nickname_list);
return v;
}