diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-01-03 23:06:12 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-01-03 23:06:12 +0000 |
commit | 9201586ed5fdd7757641ae61e1b3aa2fd7cb9d62 (patch) | |
tree | c0697857107788c56c7a625eab2a3d9af85f85f9 /src | |
parent | d3e57378ec4a81c6264dd6cb7e852a8796277359 (diff) | |
download | tor-9201586ed5fdd7757641ae61e1b3aa2fd7cb9d62.tar.gz tor-9201586ed5fdd7757641ae61e1b3aa2fd7cb9d62.zip |
Another attempt at fixing coverity scan CID 361.
svn:r17863
Diffstat (limited to 'src')
-rw-r--r-- | src/or/routerlist.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index a58976a7e9..ddb488df49 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -3295,7 +3295,8 @@ routerlist_remove_old_routers(void) * decide to kill routers.) */ /* XXX021 we don't check if we have a v3 consensus, do we? should we? -RD */ if (!caches || - smartlist_len(networkstatus_v2_list) > get_n_v2_authorities() / 2) { + (networkstatus_v2_list && + smartlist_len(networkstatus_v2_list) > get_n_v2_authorities() / 2)) { cutoff = now - ROUTER_MAX_AGE; /* Remove too-old unrecommended members of routerlist->routers. */ for (i = 0; i < smartlist_len(routerlist->routers); ++i) { |