Free very-old descriptors that we do not want to add. Fix for bug 672. Backport candidate

svn:r19057
This commit is contained in:
Nick Mathewson 2009-03-16 18:47:45 +00:00
parent a331f451d0
commit ad7ebec24c
2 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,9 @@ Changes in version 0.2.1.14-??? - 2009-03-??
<hostname>:<port>, actually use the specified port rather than <hostname>:<port>, actually use the specified port rather than
defaulting to 9050. Bugfix on 0.2.1.6-alpha. defaulting to 9050. Bugfix on 0.2.1.6-alpha.
- Make directory usage recording work again. 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 Changes in version 0.2.1.13-alpha - 2009-03-09

View File

@ -3075,6 +3075,7 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg,
if (!in_consensus && from_cache && if (!in_consensus && from_cache &&
router->cache_info.published_on < time(NULL) - OLD_ROUTER_DESC_MAX_AGE) { router->cache_info.published_on < time(NULL) - OLD_ROUTER_DESC_MAX_AGE) {
*msg = "Router descriptor was really old."; *msg = "Router descriptor was really old.";
routerinfo_free(router);
return ROUTER_WAS_NOT_NEW; return ROUTER_WAS_NOT_NEW;
} }