diff options
author | Roger Dingledine <arma@torproject.org> | 2007-11-03 14:44:53 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-11-03 14:44:53 +0000 |
commit | 23fdfd4dcff24d45c78ffcae7d9dc5398b0c2150 (patch) | |
tree | 060dde532ca04176ccbb7d8ee9af810dae9a260d /src/or/connection_or.c | |
parent | 512abd5bfd50bec725604d118bcd375cc8ae528c (diff) | |
download | tor-23fdfd4dcff24d45c78ffcae7d9dc5398b0c2150.tar.gz tor-23fdfd4dcff24d45c78ffcae7d9dc5398b0c2150.zip |
Stop leaking conn->nickname every time we make a connection to a
Tor relay without knowing its expected identity digest (e.g. when
using bridges). Bugfix on 0.2.0.3-alpha.
svn:r12355
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index b910bdfbcb..eb8ca58fc6 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -663,6 +663,7 @@ connection_or_check_valid_handshake(or_connection_t *conn, int started_here, if (started_here && tor_digest_is_zero(conn->identity_digest)) { memcpy(conn->identity_digest, digest_rcvd, DIGEST_LEN); + tor_free(conn->nickname); conn->nickname = tor_malloc(HEX_DIGEST_LEN+2); conn->nickname[0] = '$'; base16_encode(conn->nickname+1, HEX_DIGEST_LEN+1, |