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 Mar 11, 2024
1 parent f080f68 commit 5c84b9d
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 5c84b9d

Please sign in to comment.