summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-08-25 06:24:17 +0000
committerRoger Dingledine <arma@torproject.org>2003-08-25 06:24:17 +0000
commit215ca90c058145f68e7c3ab6e072556a58140194 (patch)
treeeb0ecd41cacda09400cff77efc920a10bc1df3fd /src/or
parent330b038d037a37f1203a51ef1e196aec8d7631ba (diff)
downloadtor-215ca90c058145f68e7c3ab6e072556a58140194.tar.gz
tor-215ca90c058145f68e7c3ab6e072556a58140194.zip
fix a mild memory leak (10 bytes each time an OR connected to an OR)
svn:r410
Diffstat (limited to 'src/or')
-rw-r--r--src/or/connection_or.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 75a02d0d73..dd30278efb 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -535,6 +535,8 @@ or_handshake_server_process_auth(connection_t *conn) {
/* copy all relevant info to conn */
conn->addr = router->addr, conn->port = router->or_port;
conn->pkey = crypto_pk_dup_key(router->pkey);
+ if(conn->address)
+ free(conn->address);
conn->address = strdup(router->address);
/* generate a nonce */