mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
coverity 83684 more ways to close and use freed wsi
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
dfa0f9444e
commit
28e2ab6a97
1 changed files with 2 additions and 4 deletions
|
@ -752,16 +752,14 @@ try_pollout:
|
|||
NULL,
|
||||
0);
|
||||
if (n < 0)
|
||||
libwebsocket_close_and_free_session(
|
||||
context, wsi, LWS_CLOSE_STATUS_NOSTATUS);
|
||||
goto fail;
|
||||
break;
|
||||
}
|
||||
|
||||
/* >0 == completion, <0 == error */
|
||||
n = libwebsockets_serve_http_file_fragment(context, wsi);
|
||||
if (n < 0 || (n > 0 && lws_http_transaction_completed(wsi)))
|
||||
libwebsocket_close_and_free_session(context, wsi,
|
||||
LWS_CLOSE_STATUS_NOSTATUS);
|
||||
goto fail;
|
||||
break;
|
||||
|
||||
case LWS_CONNMODE_SERVER_LISTENER:
|
||||
|
|
Loading…
Add table
Reference in a new issue