aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-10-12 19:08:48 +0000
committerNick Mathewson <nickm@torproject.org>2005-10-12 19:08:48 +0000
commit905ef987e2bbbd8fefe7878e41a20f43c02ec867 (patch)
tree53ddeb853d69171a8f903eb20769b4b67541aa57 /src/or/connection_edge.c
parent9a1d204318c964a83f3f92a4b96599819d6ccdb7 (diff)
downloadtor-905ef987e2bbbd8fefe7878e41a20f43c02ec867.tar.gz
tor-905ef987e2bbbd8fefe7878e41a20f43c02ec867.zip
Make --hash-password not craash on exit.
svn:r5243
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 431c6c8cdf..45a4ef5087 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -556,9 +556,14 @@ addressmap_clean(time_t now)
void
addressmap_free_all(void)
{
- strmap_free(addressmap, addressmap_ent_free);
- addressmap = NULL;
- strmap_free(virtaddress_reversemap, addressmap_virtaddress_ent_free);
+ if (addressmap) {
+ strmap_free(addressmap, addressmap_ent_free);
+ addressmap = NULL;
+ }
+ if (virtaddress_reversemap) {
+ strmap_free(virtaddress_reversemap, addressmap_virtaddress_ent_free);
+ virtaddress_reversemap = NULL;
+ }
}
/** Look at address, and rewrite it until it doesn't want any