From 7de0c338579b1d7bf47d61d23c82218fb93bbd8c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 28 Nov 2005 16:29:27 +0000 Subject: [PATCH] Avoid a segfault in routerlist_reset_warnings() svn:r5464 --- src/or/routerlist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 241b9e76fc..0e5ec2aa91 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -1376,6 +1376,8 @@ routerlist_reset_warnings(void) 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);