aboutsummaryrefslogtreecommitdiff
path: root/src/lib/tls/tortls_nss.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-20 12:55:31 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-20 12:55:31 -0400
commitd6c564e09ab491765b6773cc45320bc0f605fcfe (patch)
treec0b27e8b7a641013488b1ea022c473766ef7b3bd /src/lib/tls/tortls_nss.c
parent62b709bc26fe628777d2af4becdf08fd8adf1140 (diff)
downloadtor-d6c564e09ab491765b6773cc45320bc0f605fcfe.tar.gz
tor-d6c564e09ab491765b6773cc45320bc0f605fcfe.zip
Use the correct macro to detect an invalid socket in tortls_nss.c
Fixes bug 27782; bugfix on 0.3.5.1-alpha
Diffstat (limited to 'src/lib/tls/tortls_nss.c')
-rw-r--r--src/lib/tls/tortls_nss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/tls/tortls_nss.c b/src/lib/tls/tortls_nss.c
index 4e7227b12a..e1e6cc501e 100644
--- a/src/lib/tls/tortls_nss.c
+++ b/src/lib/tls/tortls_nss.c
@@ -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;