summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/geoip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/geoip.c b/src/or/geoip.c
index 3ef1672f52..26030ae52a 100644
--- a/src/or/geoip.c
+++ b/src/or/geoip.c
@@ -1279,6 +1279,8 @@ geoip_dirreq_stats_write(time_t now)
/* Generate history string .*/
str = geoip_format_dirreq_stats(now);
+ if (! str)
+ goto done;
/* Write dirreq-stats string to disk. */
if (!check_or_create_data_subdir("stats")) {