diff options
-rw-r--r-- | src/or/routerlist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 2205daf895..39e51687f4 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -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; } |