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 closing file descriptors twice #62

Merged
merged 1 commit into from
Feb 2, 2022
Merged

Fix closing file descriptors twice #62

merged 1 commit into from
Feb 2, 2022

Conversation

gco
Copy link
Contributor

@gco gco commented Jan 28, 2022

Closing the fd's in this code after using them to create new os.File objects results in the fd being closed twice with disastrous results in multi-threaded code. os.File already arranges for its finalizer to close the fd.

Found via restic tests.

Closing the fd's in this code after using them to create new os.File objects results in the fd being closed twice with disastrous results in multi-threaded code.  os.File already arranges for its finalizer to close the fd.

Found via restic tests.
@kuba-- kuba-- merged commit 492d80d into pkg:master Feb 2, 2022
@gco gco mentioned this pull request Nov 6, 2022
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