Skip to content
Snippets Groups Projects
Commit 8b93cbc1 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Merge branch 'bug20716_026' into maint-0.2.9

parents 70d39859 3b6da3f9
Branches
Tags
No related merge requests found
o Minor bugfixes (client, memory leak):
- Fix a small memory leak when receiving AF_UNIX connections on
a SocksPort. Fixes bug 20716; bugfix on 0.2.6.3-alpha.
......@@ -1594,16 +1594,19 @@ connection_handle_listener_read(connection_t *conn, int new_type)
/* remember the remote address */
tor_addr_copy(&newconn->addr, &addr);
newconn->port = port;
newconn->address = tor_addr_to_str_dup(&addr);
if (new_type == CONN_TYPE_AP && conn->socket_family == AF_UNIX) {
newconn->port = 0;
newconn->address = tor_strdup(conn->address);
} else {
newconn->port = port;
newconn->address = tor_addr_to_str_dup(&addr);
}
if (new_type == CONN_TYPE_AP && conn->socket_family != AF_UNIX) {
log_info(LD_NET, "New SOCKS connection opened from %s.",
fmt_and_decorate_addr(&addr));
}
if (new_type == CONN_TYPE_AP && conn->socket_family == AF_UNIX) {
newconn->port = 0;
newconn->address = tor_strdup(conn->address);
log_info(LD_NET, "New SOCKS AF_UNIX connection opened");
}
if (new_type == CONN_TYPE_CONTROL) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment