Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes leaking fds created by 'pipe()' call #2745

Closed
wants to merge 1 commit into from
Closed

Fixes leaking fds created by 'pipe()' call #2745

wants to merge 1 commit into from

Conversation

ERobsham
Copy link

Updates the lws_pt_destroy() logic to ensure the pipe fds are closed if either pt->dummy_pipe_fds[0] or pt->dummy_pipe_fds[1] are still valid (previously was only checking pt->dummy_pipe_fds[0] which was resulting in the write fd to leak whenever a context was destroyed).

Potential fix for issue: #2744

Updates the `lws_pt_destroy()` logic to ensure the pipe fds are closed if either `pt->dummy_pipe_fds[0]` or `pt->dummy_pipe_fds[1]` are still valid (previously was only checking `pt->dummy_pipe_fds[0]` which was resulting in the write fd to leak whenever a context was destroyed).
@ERobsham
Copy link
Author

@lws-team Just as an FYI, I discovered this while building off 4.2-stable. Not sure if its possible/makes sense to get this backported into there too?

@lws-team
Copy link
Member

Thanks forthe patch and sorry for the delay. It's pushed on main + v4.3-stable.

@lws-team lws-team closed this Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants