Skip to content

Commit

Permalink
lint: Fix a file descriptor leak
Browse files Browse the repository at this point in the history
This leak is enough to cause `make lintshort` fail when run under the
default file descriptor limit on macos (256).

Release note: None
  • Loading branch information
bdarnell committed Jun 6, 2018
1 parent 56686b6 commit 20e8446
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/testutils/lint/lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@ func TestLint(t *testing.T) {
t.Error(err)
return
}
defer file.Close()
firstLine, err := bufio.NewReader(file).ReadString('\n')
if err != nil {
t.Errorf("reading first line of %s: %s", filename, err)
Expand Down

0 comments on commit 20e8446

Please sign in to comment.