fix likely fd leak

This commit is contained in:
Brad Fitzpatrick 2010-08-02 20:50:54 -07:00
parent 6b42b42c1a
commit f7cc633360
1 changed files with 1 additions and 0 deletions

View File

@ -25,6 +25,7 @@ func readBlobs(ch chan *blobInfo, blobPrefix, diskRoot, after string, remain *ui
ch <- &blobInfo{Error: &err} ch <- &blobInfo{Error: &err}
return return
} }
defer dir.Close()
names, err := dir.Readdirnames(32768) names, err := dir.Readdirnames(32768)
if err != nil { if err != nil {
fmt.Println("Error reading dirnames: ", err) fmt.Println("Error reading dirnames: ", err)