From f7cc633360d4c8d547c63487647d968f9665797e Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 2 Aug 2010 20:50:54 -0700 Subject: [PATCH] fix likely fd leak --- blobserver/go/enumerate.go | 1 + 1 file changed, 1 insertion(+) diff --git a/blobserver/go/enumerate.go b/blobserver/go/enumerate.go index aad470589..9f7c54990 100644 --- a/blobserver/go/enumerate.go +++ b/blobserver/go/enumerate.go @@ -25,6 +25,7 @@ func readBlobs(ch chan *blobInfo, blobPrefix, diskRoot, after string, remain *ui ch <- &blobInfo{Error: &err} return } + defer dir.Close() names, err := dir.Readdirnames(32768) if err != nil { fmt.Println("Error reading dirnames: ", err)