summaryrefslogtreecommitdiff
path: root/src/or/rephist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r--src/or/rephist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c
index 3d5000ccf8..0cd60eeb83 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -2657,6 +2657,8 @@ rep_hist_format_desc_stats(time_t now)
return NULL;
size = digestmap_size(served_descs);
+ if (size == 0)
+ return NULL;
vals = tor_malloc(size * sizeof(int));
for (iter = digestmap_iter_init(served_descs); !digestmap_iter_done(iter);