diff options
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 3700cd134e..3338cd7527 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1292,7 +1292,11 @@ clear_cached_dir(cached_dir_t *d) static void _free_cached_dir(void *_d) { - cached_dir_t *d = (cached_dir_t *)_d; + cached_dir_t *d; + if (!_d) + return; + + d = (cached_dir_t *)_d; cached_dir_decref(d); } |