fix heap corruption if HTTP callback calls libwebsocket_close_and_free_session
Signed-off-by: Nick Dowell <nick@nickdowell.com>
This commit is contained in:
parent
fd96330920
commit
f803c0d9df
1 changed files with 1 additions and 1 deletions
|
@ -596,11 +596,11 @@ libwebsocket_read(struct libwebsocket_context *context, struct libwebsocket *wsi
|
|||
|
||||
if (!wsi->utf8_token[WSI_TOKEN_UPGRADE].token_len ||
|
||||
!wsi->utf8_token[WSI_TOKEN_CONNECTION].token_len) {
|
||||
wsi->state = WSI_STATE_HTTP;
|
||||
if (wsi->protocol->callback)
|
||||
(wsi->protocol->callback)(context, wsi,
|
||||
LWS_CALLBACK_HTTP, wsi->user_space,
|
||||
wsi->utf8_token[WSI_TOKEN_GET_URI].token, 0);
|
||||
wsi->state = WSI_STATE_HTTP;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue