Skip to content

Commit

Permalink
Merge pull request #202 from lance6716/patch-1
Browse files Browse the repository at this point in the history
close file explicitly, to avoid "max open files" error
  • Loading branch information
kisielk committed Jun 25, 2021
2 parents cf5d9bf + e6ab97f commit 8ddee48
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions errcheck/errcheck.go
Expand Up @@ -543,6 +543,7 @@ func readfile(filename string) []string {
if err != nil {
return nil
}
defer f.Close()

var lines []string
var scanner = bufio.NewScanner(f)
Expand Down

0 comments on commit 8ddee48

Please sign in to comment.