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

cilium-dbg: avoid leaking file resources #31750

Merged
merged 2 commits into from
Apr 3, 2024

Commits on Apr 3, 2024

  1. cilium-dbg: don't write to file on error opening

    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>
    tklauser committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    6612770 View commit details
    Browse the repository at this point in the history
  2. cilium-dbg: avoid leaking file resources

    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 committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    bf0bbe6 View commit details
    Browse the repository at this point in the history