1
0
mirror of https://github.com/golang/go synced 2024-11-21 22:04:39 -07:00

godoc: plug file descriptor leak

R=gri
CC=r
https://golang.org/cl/157149
This commit is contained in:
Russ Cox 2009-11-24 13:21:14 -08:00
parent 9da8d88499
commit 7c9acae2f1

View File

@ -859,6 +859,7 @@ func isTextFile(path string) bool {
if err != nil {
return false
}
defer f.Close();
var buf [1024]byte;
n, err := f.Read(&buf);