[or-cvs] r19057: {tor} Free very-old descriptors that we do not want to add. Fix fo (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Mon Mar 16 18:47:46 UTC 2009


Author: nickm
Date: 2009-03-16 14:47:45 -0400 (Mon, 16 Mar 2009)
New Revision: 19057

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/routerlist.c
Log:
Free very-old descriptors that we do not want to add.  Fix for bug 672.  Backport candidate

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2009-03-16 18:42:40 UTC (rev 19056)
+++ tor/trunk/ChangeLog	2009-03-16 18:47:45 UTC (rev 19057)
@@ -7,6 +7,9 @@
       <hostname>:<port>, actually use the specified port rather than
       defaulting to 9050. Bugfix on 0.2.1.6-alpha.
     - Make directory usage recording work again. Bugfix on 0.2.1.6-alpha.
+    - When starting with a cache over a few days old, do not leak
+      memory for the obsolete router descriptors in it.  Bugfix on
+      0.2.0.33.
 
 
 Changes in version 0.2.1.13-alpha - 2009-03-09

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2009-03-16 18:42:40 UTC (rev 19056)
+++ tor/trunk/src/or/routerlist.c	2009-03-16 18:47:45 UTC (rev 19057)
@@ -3075,6 +3075,7 @@
   if (!in_consensus && from_cache &&
       router->cache_info.published_on < time(NULL) - OLD_ROUTER_DESC_MAX_AGE) {
     *msg = "Router descriptor was really old.";
+    routerinfo_free(router);
     return ROUTER_WAS_NOT_NEW;
   }
 



More information about the tor-commits mailing list