[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Avoid a segfault in routerlist_reset_warnings()



Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv19976/src/or

Modified Files:
	routerlist.c 
Log Message:
Avoid a segfault in routerlist_reset_warnings()

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.381
retrieving revision 1.382
diff -u -d -r1.381 -r1.382
--- routerlist.c	23 Nov 2005 07:30:44 -0000	1.381
+++ routerlist.c	28 Nov 2005 16:29:27 -0000	1.382
@@ -1376,6 +1376,8 @@
   SMARTLIST_FOREACH(warned_conflicts, char *, cp, tor_free(cp));
   smartlist_clear(warned_conflicts); /* now the list is empty. */
 
+  if (!routerstatus_list)
+    routerstatus_list = smartlist_create();
   SMARTLIST_FOREACH(routerstatus_list, local_routerstatus_t *, rs,
                     rs->name_lookup_warned = 0);