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

Fix pipe end socket fd left open leak

This commit is contained in:
Märt Laak 2023-01-30 08:51:43 +02:00
parent ec6d5ac6d5
commit 04072ca0eb

View file

@ -921,7 +921,10 @@ __lws_close_free_wsi_final(struct lws *wsi)
if (pt->pipe_wsi == wsi)
pt->pipe_wsi = NULL;
if (pt->dummy_pipe_fds[0] == wsi->desc.sockfd)
{
pt->dummy_pipe_fds[0] = LWS_SOCK_INVALID;
compatible_close(pt->dummy_pipe_fds[1]);
}
}
wsi->desc.sockfd = LWS_SOCK_INVALID;