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:
e0212b8
)
coverity 169268 + 169270- dead code plus repeat NULL check on error path
author
Andy Green
<andy@warmcat.com>
Sun, 28 Aug 2016 01:15:26 +0000
(09:15 +0800)
committer
Andy Green
<andy@warmcat.com>
Sun, 28 Aug 2016 01:44:15 +0000
(09:44 +0800)
lib/client.c
patch
|
blob
|
history
diff --git
a/lib/client.c
b/lib/client.c
index
4171cbc
..
6af36c8
100755
(executable)
--- a/
lib/client.c
+++ b/
lib/client.c
@@
-921,9
+921,10
@@
bail3:
close_reason = LWS_CLOSE_STATUS_NOSTATUS;
bail2:
- wsi->protocol->callback(wsi, LWS_CALLBACK_CLIENT_CONNECTION_ERROR,
+ if (wsi->protocol)
+ wsi->protocol->callback(wsi, LWS_CALLBACK_CLIENT_CONNECTION_ERROR,
wsi->user_space, (void *)cce,
- (unsigned int)
(cce ? strlen(cce): 0
));
+ (unsigned int)
strlen(cce
));
wsi->already_did_cce = 1;
lwsl_info("closing connection due to bail2 connection error\n");