Skip to content

Commit

Permalink
Merge pull request #902 from testwill/close_file
Browse files Browse the repository at this point in the history
fix: close SeedFile
  • Loading branch information
mfanjie authored Jun 4, 2024
2 parents 4f4e3cd + d5e108b commit f51084f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/providers/mock/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func NewProvider(config *providers.MockConfig) (providers.Interface, error) {
klog.ErrorS(err, "Failed to open seed file", "seedFile", config.SeedFile)
return nil, err
}
defer r.Close()
buf, err := ioutil.ReadAll(r)
if err != nil {
klog.ErrorS(err, "Failed to read seed file", "seedFile", config.SeedFile)
Expand Down

0 comments on commit f51084f

Please sign in to comment.