diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-10-28 18:44:51 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-10-28 18:44:51 +0000 |
commit | ed32d85a04aea72d598232a1ac78b3496d558dcb (patch) | |
tree | e0ef991e3b2656b8fc89c8a4532920cb89f71608 | |
parent | 76988bafbed829f9331aeb5b43a99a231141f34b (diff) | |
download | tor-ed32d85a04aea72d598232a1ac78b3496d558dcb.tar tor-ed32d85a04aea72d598232a1ac78b3496d558dcb.tar.gz |
router_add_to_routerlist() really needs to free not-added routers.
svn:r5328
-rw-r--r-- | src/or/routerlist.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index eb12a890f..e6303b80f 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; } */ |