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:
6a75dca
)
coverity 169271 - take care about sockfd of -1 on close
author
Andy Green
<andy@warmcat.com>
Sun, 28 Aug 2016 01:54:30 +0000
(09:54 +0800)
committer
Andy Green
<andy@warmcat.com>
Sun, 28 Aug 2016 01:54:30 +0000
(09:54 +0800)
lib/libwebsockets.c
patch
|
blob
|
history
diff --git
a/lib/libwebsockets.c
b/lib/libwebsockets.c
index c475d6a9bec9dae6390f687cd1c612755c928187..f62c156174cfe24eb150ca229f5d50d88bb9f712 100755
(executable)
--- a/
lib/libwebsockets.c
+++ b/
lib/libwebsockets.c
@@
-420,7
+420,8
@@
just_kill_connection:
lws_remove_from_timeout_list(wsi);
/* checking return redundant since we anyway close */
- remove_wsi_socket_from_fds(wsi);
+ if (wsi->sock != LWS_SOCK_INVALID)
+ remove_wsi_socket_from_fds(wsi);
wsi->state = LWSS_DEAD_SOCKET;