summaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-03-23 00:19:51 +0000
committerRoger Dingledine <arma@torproject.org>2005-03-23 00:19:51 +0000
commita523439cbc131facdcde10f6c25edb1a8f995724 (patch)
treed97ce06ff3f2c930ae6a9c6e56dfaa4568674bab /src/or/connection_edge.c
parente28b8aaa4078a9318227edd554a7296199b95f5a (diff)
downloadtor-a523439cbc131facdcde10f6c25edb1a8f995724.tar.gz
tor-a523439cbc131facdcde10f6c25edb1a8f995724.zip
maybe resolve an assert trigger i just got:
connection_edge.c:643 address_is_in_virtual_range: Assertion addr failed; aborting. nick, what do you think? svn:r3825
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 5550e55518..db301a715b 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -551,12 +551,12 @@ void addressmap_register(const char *address, char *new_address, time_t expires)
}
return;
}
- if (ent) { /* we'll replace it */
+ if (ent && ent->new_address) { /* we'll replace it */
if (address_is_in_virtual_range(ent->new_address)) {
addressmap_virtaddress_remove(address, ent);
}
tor_free(ent->new_address);
- } else { /* make a new one and register it */
+ } else if (!ent) { /* make a new one and register it */
ent = tor_malloc_zero(sizeof(addressmap_entry_t));
strmap_set(addressmap, address, ent);
}