8000 cilium-dbg: avoid leaking file resources by tklauser · Pull Request #31750 · cilium/cilium · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cilium-dbg: avoid leaking file resources #31750

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

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

tklauser
Copy link
Member
@tklauser tklauser commented Apr 3, 2024

Files opened using os.Open{,File} need to be closed manually using os.(*File).Close to avoid leaking os.(*File) instances and file descriptors.

tklauser added 2 commits April 3, 2024 15:20
If os.OpenFile returns an error we shouldn't be writing to the returned
os.(*File) instance which might be nil.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
Files opened using os.Open{,File} need to be closed manually using
os.(*File).Close to avoid leaking os.(*File) instances and file
descriptors.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
@tklauser tklauser added release-note/misc This PR makes changes that have no direct user impact. needs-backport/1.13 needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch labels Apr 3, 2024
@tklauser tklauser requested a review from a team as a code owner April 3, 2024 13:25
@tklauser tklauser requested a review from derailed April 3, 2024 13:25
@tklauser
Copy link
Member Author
tklauser commented Apr 3, 2024

/test

Copy link
Contributor
@derailed derailed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tklauser Nice catch. Thanks for the updates Tobias!

@tklauser tklauser enabled auto-merge April 3, 2024 15:02
@tklauser tklauser added this pull request to the merge queue Apr 3, 2024
Merged via the queue into main with commit 7aa2c74 Apr 3, 2024
@tklauser tklauser deleted the pr/tklauser/debuginfo-file-leak branch April 3, 2024 15:36
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Apr 3, 2024
@nbusseneau nbusseneau mentioned this pull request Apr 10, 2024
8 tasks
@nbusseneau nbusseneau mentioned this pull request Apr 10, 2024
9 tasks
@nbusseneau nbusseneau added backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. and removed needs-backport/1.14 labels Apr 10, 2024
@nbusseneau nbusseneau mentioned this pull request Apr 10, 2024
13 tasks
@nbusseneau nbusseneau added backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. and removed needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch labels Apr 10, 2024
@github-actions github-actions bot added backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. and removed backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. labels Apr 11, 2024
@github-actions github-actions bot added backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. and removed backport-pending/1.13 labels Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
No open projects
Status: Released
Status: Released
Status: Released
Development

Successfully merging this pull request may close these issues.

3 participants
0