fixes socket fd leak when SSL_accept fails

Sat, 21 Jan 2017 12:46:31 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 21 Jan 2017 12:46:31 +0100
changeset 150
89af278b7dbb
parent 149
aa016efb9ad7
child 151
74d21dd5fd5d

fixes socket fd leak when SSL_accept fails

src/server/daemon/httplistener.c file | annotate | diff | comparison | revisions
--- a/src/server/daemon/httplistener.c	Mon Jan 16 14:41:20 2017 +0100
+++ b/src/server/daemon/httplistener.c	Sat Jan 21 12:46:31 2017 +0100
@@ -410,6 +410,7 @@
                 log_ereport(LOG_INFORM, "SSL accept error: %d", error);
                 free(conn);
                 conn = NULL;
+                close(clientfd);
             } else {
                 conn->ssl = ssl;
                 conn->read = connection_ssl_read;

mercurial