summaryrefslogtreecommitdiff
path: root/src/or/consdiffmgr.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-04-25 19:53:00 -0400
committerNick Mathewson <nickm@torproject.org>2017-04-27 21:40:12 -0400
commitfba8d7b222bf00cf2812362072e913c26a41b370 (patch)
tree709a029d80ebd484593fa93c68e4185c592f259b /src/or/consdiffmgr.c
parent24f7059704433834a7335286e552eda7f030666f (diff)
downloadtor-fba8d7b222bf00cf2812362072e913c26a41b370.tar.gz
tor-fba8d7b222bf00cf2812362072e913c26a41b370.zip
Initialize consdiffmgr when running as (or becoming) a server.
Diffstat (limited to 'src/or/consdiffmgr.c')
-rw-r--r--src/or/consdiffmgr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/consdiffmgr.c b/src/or/consdiffmgr.c
index 41e37ac6c5..160dcafd81 100644
--- a/src/or/consdiffmgr.c
+++ b/src/or/consdiffmgr.c
@@ -622,7 +622,8 @@ consdiffmgr_cleanup(void)
void
consdiffmgr_configure(const consdiff_cfg_t *cfg)
{
- memcpy(&consdiff_cfg, cfg, sizeof(consdiff_cfg));
+ if (cfg)
+ memcpy(&consdiff_cfg, cfg, sizeof(consdiff_cfg));
(void) cdm_cache_get();
}