client: protect against possible NULL deref path
This commit is contained in:
parent
10eacf2873
commit
eefcaa762e
1 changed files with 3 additions and 1 deletions
|
@ -499,7 +499,9 @@ just_kill_connection:
|
|||
char* errorString;
|
||||
|
||||
lwsl_debug("Connection closed before server reply\n");
|
||||
errorString = lws_hdr_simple_ptr(wsi, WSI_TOKEN_HTTP);
|
||||
errorString = NULL;
|
||||
if (wsi->u.hdr.ah)
|
||||
errorString = lws_hdr_simple_ptr(wsi, WSI_TOKEN_HTTP);
|
||||
if (errorString) {
|
||||
wsi->vhost->protocols[0].callback(wsi,
|
||||
LWS_CALLBACK_CLIENT_CONNECTION_ERROR,
|
||||
|
|
Loading…
Add table
Reference in a new issue