From: Nick Mathewson Date: Thu, 20 Sep 2018 16:53:39 +0000 (-0400) Subject: Release ownership of the dummy socket that tortls_nss.c will close X-Git-Tag: tor-0.3.5.2-alpha~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=62b709bc26fe628777d2af4becdf08fd8adf1140;p=thirdparty%2Ftor.git Release ownership of the dummy socket that tortls_nss.c will close Related to #27795 -- since NSS will close the socket, we must not count it as owned by Tor. --- diff --git a/src/lib/tls/tortls_nss.c b/src/lib/tls/tortls_nss.c index 88d2be8cee..4e7227b12a 100644 --- a/src/lib/tls/tortls_nss.c +++ b/src/lib/tls/tortls_nss.c @@ -456,6 +456,9 @@ tor_tls_release_socket(tor_tls_t *tls) } PR_ChangeFileDescNativeHandle(tcp, sock); + /* Tell our socket accounting layer that we don't own this socket any more: + * NSS is about to free it for us. */ + tor_release_socket_ownership(sock); } void