Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix pipe end socket fd left open leak
  • Loading branch information
martlaak committed Jan 30, 2023
commit 04072ca0eb691375210e3b273576c611b57044ca
3 changes: 3 additions & 0 deletions lib/core-net/close.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down