aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-03-16 18:47:45 +0000
committerNick Mathewson <nickm@torproject.org>2009-03-16 18:47:45 +0000
commitad7ebec24c59a062e575b43a7b3d3d9c614b4933 (patch)
treec9a73a365cec8d45a4622db2de83869f08b92495
parenta331f451d04a736b6a42c236bd84dcd390a88c60 (diff)
downloadtor-ad7ebec24c59a062e575b43a7b3d3d9c614b4933.tar
tor-ad7ebec24c59a062e575b43a7b3d3d9c614b4933.tar.gz
Free very-old descriptors that we do not want to add. Fix for bug 672. Backport candidate
svn:r19057
-rw-r--r--ChangeLog3
-rw-r--r--src/or/routerlist.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 23d2d8c8d..ad4846629 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,9 @@ Changes in version 0.2.1.14-??? - 2009-03-??
<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
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index a606d57e2..947e90898 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -3075,6 +3075,7 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg,
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;
}