Skip to content

Commit

Permalink
Close YAML file handle when parsing flatfile backend (#222)
Browse files Browse the repository at this point in the history
This PR is equivalent to #217.

It closes the YAML file ensuring we don't leak handles.
  • Loading branch information
mergify[bot] authored Jan 15, 2023
2 parents b0c31d0 + 87ddb88 commit 5465714
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/backend/flatfile/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func FromYAMLFile(path string) (*Backend, error) {
if err != nil {
return nil, err
}
defer fh.Close()

return FromYAML(fh)
}

0 comments on commit 5465714

Please sign in to comment.