cmd/benchcmp: close file when parse done
prevent file descriptor leak Signed-off-by: Tw <tw19881113@gmail.com> Change-Id: Ia1cacb3a287477b1f9b50fae248b5c34156c9557 Reviewed-on: https://go-review.googlesource.com/2740 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
996ff9bec3
commit
230eaff9cf
|
@ -142,6 +142,7 @@ func parseFile(path string) parse.BenchSet {
|
|||
if err != nil {
|
||||
fatal(err)
|
||||
}
|
||||
defer f.Close()
|
||||
bb, err := parse.ParseBenchSet(f)
|
||||
if err != nil {
|
||||
fatal(err)
|
||||
|
|
Loading…
Reference in New Issue