client: protect against possible NULL deref path
This commit is contained in:
parent
09d8720034
commit
249b2d049b
1 changed files with 3 additions and 1 deletions
|
@ -408,7 +408,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) {
|
||||
context->protocols[0].callback(wsi,
|
||||
LWS_CALLBACK_CLIENT_CONNECTION_ERROR,
|
||||
|
|
Loading…
Add table
Reference in a new issue