[or-cvs] r15820: fix a rare segfault in bw-share-measuring code (in tor/trunk: . src/or)
nickm at seul.org
nickm at seul.org
Thu Jul 10 18:31:29 UTC 2008
Author: nickm
Date: 2008-07-10 14:31:28 -0400 (Thu, 10 Jul 2008)
New Revision: 15820
Modified:
tor/trunk/
tor/trunk/src/or/routerlist.c
Log:
r16881 at tombo: nickm | 2008-07-10 14:19:21 -0400
fix a rare segfault in bw-share-measuring code
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r16881] on 49666b30-7950-49c5-bedf-9dc8f3168102
Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c 2008-07-10 15:29:14 UTC (rev 15819)
+++ tor/trunk/src/or/routerlist.c 2008-07-10 18:31:28 UTC (rev 15820)
@@ -875,8 +875,10 @@
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 */
More information about the tor-commits
mailing list