diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-12-18 10:00:44 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-12-18 10:00:44 -0500 |
commit | 4604b3ab197af5f6d0d407bd2dbe4b0d6a14e22b (patch) | |
tree | 6184dfde64d16a2e15d457492ea8a51e88981425 /src/or/geoip.c | |
parent | 2e74d182b2a10a32efd7203e9e430d9b431397c8 (diff) | |
download | tor-4604b3ab197af5f6d0d407bd2dbe4b0d6a14e22b.tar.gz tor-4604b3ab197af5f6d0d407bd2dbe4b0d6a14e22b.zip |
Fix a null-pointer deref when writing geoip stats
Found by coverity; CID 1327892.
Diffstat (limited to 'src/or/geoip.c')
-rw-r--r-- | src/or/geoip.c | 2 |
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")) { |