Skip to content

Commit

Permalink
fix: remove config file fd leak
Browse files Browse the repository at this point in the history
I don't know why I didn't just close it after leaving the function.
There is no other use of the fd...
  • Loading branch information
fionera committed Jun 21, 2024
1 parent 59f0463 commit 8445726
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func readConfig() (*config, error) {
if err != nil {
return nil, err
}
defer open.Close()

d := yaml.NewDecoder(open)
d.KnownFields(true)
Expand Down

0 comments on commit 8445726

Please sign in to comment.