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

fix: file descriptor leak (#24366) #24397

Open
wants to merge 2 commits into
base: main-2.x
Choose a base branch
from

Conversation

cbainlive
Copy link

The returned function of errors2.Capture needs to be called.

Closes #24366

The wrapper function that is returned by errors2.Capture is not getting called by defer in a few places. This results in file descriptor resource leak. Additionally, ensure that the File.Close is only called if successfully created/opened.

  • I've read the contributing section of the project README.
  • Signed CLA (if not already signed).

@cbainlive cbainlive changed the title Main 2.x fix: file descriptor leak (#24366) Sep 29, 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.

1 participant