summaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 3706769a46..4cc88fd7ce 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -749,8 +749,10 @@ router_rebuild_store(int flags, desc_store_t *store)
smartlist_free(signed_descriptors);
tor_free(fname);
tor_free(fname_tmp);
- SMARTLIST_FOREACH(chunk_list, sized_chunk_t *, c, tor_free(c));
- smartlist_free(chunk_list);
+ if (chunk_list) {
+ SMARTLIST_FOREACH(chunk_list, sized_chunk_t *, c, tor_free(c));
+ smartlist_free(chunk_list);
+ }
return r;
}