mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix a memory leak of one address string per DNSPort request.
svn:r17681
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user