projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f4e2d2
)
coverity 157402 explicitly disallow handling invalid sockfd
author
Andy Green
<andy.green@linaro.org>
Fri, 29 Jan 2016 07:40:08 +0000
(15:40 +0800)
committer
Andy Green
<andy.green@linaro.org>
Fri, 29 Jan 2016 07:40:08 +0000
(15:40 +0800)
Signed-off-by: Andy Green <andy.green@linaro.org>
lib/ssl.c
patch
|
blob
|
history
diff --git
a/lib/ssl.c
b/lib/ssl.c
index
364ab29
..
751f9c1
100644
(file)
--- a/
lib/ssl.c
+++ b/
lib/ssl.c
@@
-612,7
+612,8
@@
lws_server_socket_service_ssl(struct lws *wsi, lws_sockfd_type accept_fd)
lwsl_err("SSL_new failed: %s\n",
ERR_error_string(SSL_get_error(wsi->ssl, 0), NULL));
lws_decode_ssl_error();
- compatible_close(accept_fd);
+ if (accept_fd != LWS_SOCK_INVALID)
+ compatible_close(accept_fd);
goto fail;
}