[or-cvs] router_add_to_routerlist() really needs to free not-added r...

Nick Mathewson nickm at seul.org
Fri Oct 28 18:44:53 UTC 2005


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv6667/src/or

Modified Files:
	routerlist.c 
Log Message:
router_add_to_routerlist() really needs to free not-added routers.

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.355
retrieving revision 1.356
diff -u -d -r1.355 -r1.356
--- routerlist.c	27 Oct 2005 23:06:09 -0000	1.355
+++ routerlist.c	28 Oct 2005 18:44:51 -0000	1.356
@@ -1386,18 +1386,22 @@
     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;
     }
     */



More information about the tor-commits mailing list