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

Use the correct macro to detect an invalid socket in tortls_nss.c

Fixes bug 27782; bugfix on 0.3.5.1-alpha
parent 62b709bc
No related branches found
No related tags found
No related merge requests found
o Minor bugfixes (NSS):
- Correctly detect failure to open a dummy TCP socket when
stealing ownership of an fd from the NSS layer. Fixes bug 27782;
bugfix on 0.3.5.1-alpha.
......@@ -444,7 +444,7 @@ tor_tls_release_socket(tor_tls_t *tls)
*/
tor_socket_t sock =
tor_open_socket_nonblocking(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (!sock) {
if (! SOCKET_OK(sock)) {
log_warn(LD_NET, "Out of sockets when trying to shut down an NSS "
"connection");
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment