diff options
author | Linus Nordberg <linus@nordberg.se> | 2012-03-27 15:00:34 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2012-03-28 20:57:45 +0200 |
commit | 1b6f6bfda59989389983602c57ef0028dd736908 (patch) | |
tree | 5af26f11e5e5b8dc1aef96cc5649d4b881c64b42 /src/or/rephist.c | |
parent | 77bc1b803e0d58b23ff48c2359300ef812f10ee1 (diff) | |
download | tor-1b6f6bfda59989389983602c57ef0028dd736908.tar.gz tor-1b6f6bfda59989389983602c57ef0028dd736908.zip |
Don't try to generate stats from an empty served_descs.
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r-- | src/or/rephist.c | 2 |
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); |