From ed32d85a04aea72d598232a1ac78b3496d558dcb Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 28 Oct 2005 18:44:51 +0000 Subject: [PATCH] router_add_to_routerlist() really needs to free not-added routers. svn:r5328 --- src/or/routerlist.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/or/routerlist.c b/src/or/routerlist.c index eb12a890fe..e6303b80f0 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -1386,18 +1386,22 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, info(LD_DIR, "Dropping descriptor that we already have for router '%s'", router->nickname); *msg = "Router descriptor was not new."; + routerinfo_free(router); return -1; } if (authdir) { - if (authdir_wants_to_reject_router(router, msg)) + if (authdir_wants_to_reject_router(router, msg)) { + routerinfo_free(router); return -2; + } authdir_verified = router->is_verified; /* } else { if (! router->xx_is_recognized && !from_cache) { log_fn(LOG_WARN, "Dropping unrecognized descriptor for router '%s'", router->nickname); + rouerinfo_free(router); return -1; } */ -- 2.11.4.GIT