Fix memory leak

svn:r2535
This commit is contained in:
Nick Mathewson 2004-10-16 08:39:56 +00:00
parent 9d5831341e
commit 56a592dbe3

View File

@ -329,8 +329,10 @@ router_nickname_is_in_list(routerinfo_t *router, const char *list)
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;
}