aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/microdesc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/microdesc.c b/src/or/microdesc.c
index 5740c40d5f..1554aca918 100644
--- a/src/or/microdesc.c
+++ b/src/or/microdesc.c
@@ -399,10 +399,11 @@ microdesc_cache_rebuild(microdesc_cache_t *cache, int force)
smartlist_add(wrote, md);
}
- finish_writing_to_file(open_file); /*XXX Check me.*/
-
if (cache->cache_content)
tor_munmap_file(cache->cache_content);
+
+ finish_writing_to_file(open_file); /*XXX Check me.*/
+
cache->cache_content = tor_mmap_file(cache->cache_fname);
if (!cache->cache_content && smartlist_len(wrote)) {