aboutsummaryrefslogtreecommitdiff
path: root/src/lib/tls
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-20 13:53:04 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-20 13:53:04 -0400
commit4e2028152d31e27c44d0c2ef31dca829c6ae2d2e (patch)
tree8cde1321bd2eb53b7476d0c8db394bc0c6c74241 /src/lib/tls
parentd6c564e09ab491765b6773cc45320bc0f605fcfe (diff)
downloadtor-4e2028152d31e27c44d0c2ef31dca829c6ae2d2e.tar.gz
tor-4e2028152d31e27c44d0c2ef31dca829c6ae2d2e.zip
Fix an NSS socket leak-on-error found by dgoulet
Diffstat (limited to 'src/lib/tls')
-rw-r--r--src/lib/tls/tortls_nss.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/tls/tortls_nss.c b/src/lib/tls/tortls_nss.c
index e1e6cc501e..462cd5b0ff 100644
--- a/src/lib/tls/tortls_nss.c
+++ b/src/lib/tls/tortls_nss.c
@@ -452,6 +452,7 @@ tor_tls_release_socket(tor_tls_t *tls)
PRFileDesc *tcp = PR_GetIdentitiesLayer(tls->ssl, PR_NSPR_IO_LAYER);
if (BUG(! tcp)) {
+ tor_close_socket(sock);
return;
}