r16881@tombo: nickm | 2008-07-10 14:19:21 -0400

fix a rare segfault in bw-share-measuring code


svn:r15820
This commit is contained in:
Nick Mathewson 2008-07-10 18:31:28 +00:00
parent 135fa82a10
commit c717e19a29

View File

@ -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 */