Pārlūkot izejas kodu

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.
Nick Mathewson 5 gadi atpakaļ
vecāks
revīzija
62b709bc26
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      src/lib/tls/tortls_nss.c

+ 3 - 0
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