summaryrefslogtreecommitdiff
path: root/src/or/geoip.c
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2010-09-27 23:15:43 +0200
committerSebastian Hahn <sebastian@torproject.org>2010-09-27 23:19:25 +0200
commitc951830002706719fd98f87dabd82437f3f392ac (patch)
tree38e2c94870165e77aa17056b6221c1c58648f04e /src/or/geoip.c
parente3859615429ec8d3939e21cd65fa07cc56bb5d0c (diff)
downloadtor-c951830002706719fd98f87dabd82437f3f392ac.tar.gz
tor-c951830002706719fd98f87dabd82437f3f392ac.zip
Fix a bridge segfault
When we enabled support to change statistic options without restarting Tor we forgot to initialize geoip_countries. Fix that.
Diffstat (limited to 'src/or/geoip.c')
-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 7f1052e98d..ee8d72ee1d 100644
--- a/src/or/geoip.c
+++ b/src/or/geoip.c
@@ -254,6 +254,8 @@ geoip_get_country_by_ip(uint32_t ipaddr)
int
geoip_get_n_countries(void)
{
+ if (!geoip_countries)
+ init_geoip_countries();
return (int) smartlist_len(geoip_countries);
}