1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

windows: fix possible crash

Checking for (!wsi) does not make sense, if wsi is
dereferenced in the line above.
This commit is contained in:
Frank May 2018-08-19 06:43:14 +08:00 committed by Andy Green
parent fab4bff4f6
commit e17820cf67

View file

@ -82,9 +82,9 @@ _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
continue;
wsi = wsi_from_fd(context, pfd->fd);
if (wsi->listener)
if (!wsi || wsi->listener)
continue;
if (!wsi || wsi->sock_send_blocking)
if (wsi->sock_send_blocking)
continue;
pfd->revents = LWS_POLLOUT;
n = lws_service_fd(context, pfd);