Skip to content

local: Fix fd leak when encountering files directly inside data/#3568

Merged
rawtaz merged 1 commit intorestic:masterfrom
MichaelEischer:fix-local-fd-leak
Nov 7, 2021
Merged

local: Fix fd leak when encountering files directly inside data/#3568
rawtaz merged 1 commit intorestic:masterfrom
MichaelEischer:fix-local-fd-leak

Conversation

@MichaelEischer
Copy link
Copy Markdown
Member

What does this PR change? What problem does it solve?

restic currently leaks file descriptors when listing a data/ folder which directly contains files instead of in the subfolders. This PR adds the missing call to Close().

Was the change previously discussed in an issue or on the forum?

https://forum.restic.net/t/too-many-open-files/4503/12

Checklist

  • I have read the contribution guidelines.
  • I have enabled maintainer edits.
  • I have added tests for all code changes. I don't see how that would be possible.
  • [ ] I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I have run gofmt on the code in all commits.
  • All commit messages are formatted in the same style as the other commits in the repo.
  • I'm done! This pull request is ready for review.

Copy link
Copy Markdown
Contributor

@rawtaz rawtaz left a comment

Choose a reason for hiding this comment

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

As it should be, splendid find.

@rawtaz rawtaz merged commit 1b152a2 into restic:master Nov 7, 2021
@MichaelEischer MichaelEischer deleted the fix-local-fd-leak branch November 7, 2021 16:40
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