Skip to content

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