[or-cvs] r17681: {tor} Fix a memory leak of one address string per DNSPort request. (tor/trunk/src/or)
nickm at seul.org
nickm at seul.org
Thu Dec 18 15:00:27 UTC 2008
Author: nickm
Date: 2008-12-18 10:00:27 -0500 (Thu, 18 Dec 2008)
New Revision: 17681
Modified:
tor/trunk/src/or/connection_edge.c
Log:
Fix a memory leak of one address string per DNSPort request.
Modified: tor/trunk/src/or/connection_edge.c
===================================================================
--- tor/trunk/src/or/connection_edge.c 2008-12-18 15:00:18 UTC (rev 17680)
+++ tor/trunk/src/or/connection_edge.c 2008-12-18 15:00:27 UTC (rev 17681)
@@ -2198,6 +2198,7 @@
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 @@
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) {
More information about the tor-commits
mailing list