aboutsummaryrefslogtreecommitdiff
path: root/src/or/geoip.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-02-07 15:20:50 -0500
committerNick Mathewson <nickm@torproject.org>2013-02-07 15:20:50 -0500
commitba7d93db16fd53c951b6a159adeb7b4094817c11 (patch)
treeabe4ab2c73650426d9c8cbb4ffb7bf4efcd1b3b9 /src/or/geoip.c
parent0061d428900946ce8bf5c8bfb4c2b3b5faa4f691 (diff)
parentd3aabf4db176a44d19046b58b99f2edb8c5f49bb (diff)
downloadtor-ba7d93db16fd53c951b6a159adeb7b4094817c11.tar.gz
tor-ba7d93db16fd53c951b6a159adeb7b4094817c11.zip
Merge remote-tracking branch 'public/bug7816_023'
Conflicts: src/common/util.c
Diffstat (limited to 'src/or/geoip.c')
-rw-r--r--src/or/geoip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/geoip.c b/src/or/geoip.c
index 9ba1e31b8b..e2e98e8ec4 100644
--- a/src/or/geoip.c
+++ b/src/or/geoip.c
@@ -1350,8 +1350,11 @@ load_bridge_stats(time_t now)
fname = get_datadir_fname2("stats", "bridge-stats");
contents = read_file_to_str(fname, RFTS_IGNORE_MISSING, NULL);
- if (contents && validate_bridge_stats(contents, now))
+ if (contents && validate_bridge_stats(contents, now)) {
bridge_stats_extrainfo = contents;
+ } else {
+ tor_free(contents);
+ }
tor_free(fname);
}