From 8a810d38c716af1dddf8e24045eec430afd7f797 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Sat, 18 Oct 2003 04:18:26 +0000 Subject: [PATCH] no more memory leaks when you run it under normal operation for as many as three minutes svn:r622 --- trunk/src/or/routers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trunk/src/or/routers.c b/trunk/src/or/routers.c index f04fd24ed2..4ecd2fcb9c 100644 --- a/trunk/src/or/routers.c +++ b/trunk/src/or/routers.c @@ -746,11 +746,12 @@ router_resolve_directory(directory_t *dir) log_fn(LOG_WARN, "Couldn't resolve router %s; removing", dir->routers[i]->address); remove = 1; - routerinfo_free(dir->routers[i]); - } else if (options.Nickname && !strcmp(dir->routers[i]->nickname, options.Nickname)) { + } else if (options.Nickname && + !strcmp(dir->routers[i]->nickname, options.Nickname)) { remove = 1; } if (remove) { + routerinfo_free(dir->routers[i]); dir->routers[i] = dir->routers[--max]; --dir->n_routers; --i;