Skip to content

Commit

Permalink
fix file handle leak in sumTypeDeclSearch
Browse files Browse the repository at this point in the history
  • Loading branch information
jmquigs authored and BurntSushi committed May 24, 2017
1 parent da66471 commit 6527b81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions decl.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func sumTypeDeclSearch(path string) ([]sumTypeDecl, error) {
if err != nil {
return nil, err
}
defer f.Close()
lineNum := 0
scanner := bufio.NewScanner(f)
for scanner.Scan() {
Expand Down

0 comments on commit 6527b81

Please sign in to comment.