diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-18 15:00:27 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-18 15:00:27 +0000 |
commit | f9133f2528756cd73416cd70cb233abdb3b52721 (patch) | |
tree | 9ef52b24909ad5a82828dfed0a6b923d4042062e | |
parent | 148e4e88371510b9d7f3dc4768346b66faed39d4 (diff) | |
download | tor-f9133f2528756cd73416cd70cb233abdb3b52721.tar.gz tor-f9133f2528756cd73416cd70cb233abdb3b52721.zip |
Fix a memory leak of one address string per DNSPort request.
svn:r17681
-rw-r--r-- | src/or/connection_edge.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 8e2edbd58f..3e2a43917e 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -2198,6 +2198,7 @@ connection_ap_handshake_send_resolve(edge_connection_t *ap_conn) string_addr, payload_len) < 0) return -1; /* circuit is closed, don't continue */ + tor_free(ap_conn->_base.address); /* Maybe already set by dnsserv. */ ap_conn->_base.address = tor_strdup("(Tor_internal)"); ap_conn->_base.state = AP_CONN_STATE_RESOLVE_WAIT; log_info(LD_APP,"Address sent for resolve, ap socket %d, n_circ_id %d", @@ -2352,7 +2353,7 @@ connection_ap_handshake_socks_resolved(edge_connection_t *conn, conn->socks_request->has_finished = 1; return; } - /* XXXX020 are we freeing conn anywhere? */ + /* We shouldn't need to free conn here; it gets marked by the caller. */ } if (conn->socks_request->socks_version == 4) { |