1
0
Fork 0
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:
Andy Green 2014-11-30 13:35:24 +08:00
parent dfa0f9444e
commit 28e2ab6a97

View file

@ -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: