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: better clean up of file handles #2823

Merged
merged 5 commits into from
May 1, 2024

Commits on Apr 29, 2024

  1. always close ELF cataloger file handles

    The elf-binary-package-cataloger does its own file IO to account for the
    possibility of a logical ELF package being broken across multiple
    physical files. However, this casued it to skip the normal invocation
    pattern in the generic cataloger code that prevented file leaks. Ensure
    this cataloger always closes its file handles.
    
    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    willmurphyscode committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    03fdc8e View commit details
    Browse the repository at this point in the history
  2. defer closing of generic cataloger file handles

    Otherwise, a panicking cataloger could leak file handles.
    
    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    willmurphyscode committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    2d86d92 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. add unit test for file closed on panic parser

    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    willmurphyscode committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    2b7e112 View commit details
    Browse the repository at this point in the history
  2. make invoke parser a static function

    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    willmurphyscode committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    e107442 View commit details
    Browse the repository at this point in the history
  3. push error logging down into invoke parser

    Signed-off-by: Will Murphy <will.murphy@anchore.com>
    willmurphyscode committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    420507e View commit details
    Browse the repository at this point in the history