[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r12355: Stop leaking conn->nickname every time we make a connection (in tor/trunk: . src/or)
Author: arma
Date: 2007-11-03 10:44:53 -0400 (Sat, 03 Nov 2007)
New Revision: 12355
Modified:
tor/trunk/ChangeLog
tor/trunk/src/or/connection_or.c
Log:
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.
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2007-11-03 13:16:40 UTC (rev 12354)
+++ tor/trunk/ChangeLog 2007-11-03 14:44:53 UTC (rev 12355)
@@ -75,6 +75,9 @@
a vote. Bugfix on 0.2.0.3-alpha.
- Stop leaking v2_download_status_map on shutdown. Bugfix on
0.2.0.9-alpha.
+ - 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.
- Minor bugfixes (portability):
- Run correctly on platforms where rlim_t is larger than unsigned
Modified: tor/trunk/src/or/connection_or.c
===================================================================
--- tor/trunk/src/or/connection_or.c 2007-11-03 13:16:40 UTC (rev 12354)
+++ tor/trunk/src/or/connection_or.c 2007-11-03 14:44:53 UTC (rev 12355)
@@ -663,6 +663,7 @@
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,