diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-03-30 10:06:21 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-03-30 10:06:21 -0400 |
commit | 545cb5f34ea5eba4209650833634611160ab7389 (patch) | |
tree | 678ce6851773367f8ce5eece0dab7a78e8996e98 | |
parent | f348daa6fb58295d876495ba875b826e87917ec9 (diff) | |
parent | d2cf90dc8886aafc1ea16220324473697682c94f (diff) | |
download | tor-545cb5f34ea5eba4209650833634611160ab7389.tar.gz tor-545cb5f34ea5eba4209650833634611160ab7389.zip |
Merge remote-tracking branch 'linus/empty_desc_stats'
-rw-r--r-- | changes/bug5508 | 4 | ||||
-rw-r--r-- | src/or/rephist.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/changes/bug5508 b/changes/bug5508 new file mode 100644 index 0000000000..6606f822f2 --- /dev/null +++ b/changes/bug5508 @@ -0,0 +1,4 @@ + o Minor bugfixes: + - Fix a bug where a bridge authority crashes (on a failed assert) + if it has seen no directory requests when it's time to write + statistics to disk. 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); |