]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Assert that rep_hist_format_desc_stats() returns !NULL.
authorLinus Nordberg <linus@nordberg.se>
Tue, 15 May 2012 09:07:01 +0000 (11:07 +0200)
committerLinus Nordberg <linus@nordberg.se>
Tue, 15 May 2012 11:12:34 +0000 (13:12 +0200)
The guard against this is the test for
start_of_served_descs_stats_interval != 0 done earlier.

src/or/rephist.c

index 173a770b18268deb26f3b8ba7dfbc3d1fc5ef086..59e08e59fb3fae3872062c0c2409ee2d0cd6d1cb 100644 (file)
@@ -2705,6 +2705,7 @@ rep_hist_desc_stats_write(time_t now)
     return start_of_served_descs_stats_interval + WRITE_STATS_INTERVAL;
 
   str = rep_hist_format_desc_stats(now);
+  tor_assert(str != NULL);
 
   statsdir = get_datadir_fname("stats");
   if (check_private_dir(statsdir, CPD_CREATE, get_options()->User) < 0) {