]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Release ownership of the dummy socket that tortls_nss.c will close
authorNick Mathewson <nickm@torproject.org>
Thu, 20 Sep 2018 16:53:39 +0000 (12:53 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 20 Sep 2018 16:53:39 +0000 (12:53 -0400)
Related to #27795 -- since NSS will close the socket, we must not
count it as owned by Tor.

src/lib/tls/tortls_nss.c

index 88d2be8cee7707aa7b17b9b70c49b5009766d743..4e7227b12ada7055ab7df1a454c48b45244b85ba 100644 (file)
@@ -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