diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-20 12:52:29 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-20 12:52:29 -0400 |
commit | f25323fe3f64fbfee0e1c2614d0e13befe283b88 (patch) | |
tree | cefc5217f5f987309bf14c5f06764c535b9bc878 /src/core/mainloop | |
parent | 1c1e84281db6a5a8cd2a66c63481e4df316c44d5 (diff) | |
download | tor-f25323fe3f64fbfee0e1c2614d0e13befe283b88.tar.gz tor-f25323fe3f64fbfee0e1c2614d0e13befe283b88.zip |
Fix socket accounting with ORConn sockets.
When we close a socket via tor_tls_free(), we previously had no way
for our socket accounting logic to learn about it. This meant that
the socket accounting code would think we had run out of sockets,
and freak out.
Fixes bug 27795; bugfix on 0.3.5.1-alpha.
Diffstat (limited to 'src/core/mainloop')
-rw-r--r-- | src/core/mainloop/connection.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c index 0c3abc8442..b0cb5322c3 100644 --- a/src/core/mainloop/connection.c +++ b/src/core/mainloop/connection.c @@ -646,6 +646,7 @@ connection_free_minimal(connection_t *conn) } else { /* The tor_tls_free() call below will close the socket; we must tell * the code below not to close it a second time. */ + tor_release_socket_ownership(conn->s); conn->s = TOR_INVALID_SOCKET; } tor_tls_free(or_conn->tls); |