diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-07-10 18:31:28 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-07-10 18:31:28 +0000 |
commit | c717e19a295529e7fee014153ed0adadb2dfeb9d (patch) | |
tree | 1e5e754a941287e16e271ed2152a6b2fb7666d6d /src | |
parent | 135fa82a10a87dc10ef9b5c18d5f917efe82d322 (diff) | |
download | tor-c717e19a295529e7fee014153ed0adadb2dfeb9d.tar.gz tor-c717e19a295529e7fee014153ed0adadb2dfeb9d.zip |
r16881@tombo: nickm | 2008-07-10 14:19:21 -0400
fix a rare segfault in bw-share-measuring code
svn:r15820
Diffstat (limited to 'src')
-rw-r--r-- | src/or/routerlist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index af096ae5c1..3d61fa5d11 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -875,8 +875,10 @@ router_get_my_share_of_directory_requests(double *v2_share_out, routerstatus_t *rs; const int pds_flags = PDS_ALLOW_SELF|PDS_IGNORE_FASCISTFIREWALL; *v2_share_out = *v3_share_out = 0.0; + if (!me) + return -1; rs = router_get_consensus_status_by_id(me->cache_info.identity_digest); - if (!me || !rs) + if (!rs) return -1; /* Calling for side effect */ |