[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] fix a seg fault when a single directory authority hears about
Update of /home/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/tor-011x/tor/src/or
Modified Files:
Tag: tor-0_1_1-patches
routerlist.c
Log Message:
fix a seg fault when a single directory authority hears about
its first server.
Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.499.2.5
retrieving revision 1.499.2.6
diff -u -p -d -r1.499.2.5 -r1.499.2.6
--- routerlist.c 9 May 2006 09:48:56 -0000 1.499.2.5
+++ routerlist.c 9 Jun 2006 06:51:51 -0000 1.499.2.6
@@ -3646,6 +3646,8 @@ router_have_minimum_dir_info(void)
SMARTLIST_FOREACH(networkstatus_list, networkstatus_t *, ns,
tot += routerstatus_count_usable_entries(ns->entries));
avg = tot / n_ns;
+ if (!routerstatus_list)
+ routerstatus_list = smartlist_create();
SMARTLIST_FOREACH(routerstatus_list, local_routerstatus_t *, rs,
{
if (rs->status.is_running)