aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/shallow.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2018-04-17 14:28:18 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2018-04-17 14:28:18 +0200
commit46a247f8c11e580d85ef6378848a15e17b8b5401 (patch)
tree86b4b64244641a0823d09bfee3e101e538edcfc9 /storage/filesystem/shallow.go
parent60fd949ef638cf688029c5784a0a449f4c562bc7 (diff)
downloadgo-git-46a247f8c11e580d85ef6378848a15e17b8b5401.tar.gz
storage: filesystem, close shallow file when read
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
Diffstat (limited to 'storage/filesystem/shallow.go')
-rw-r--r--storage/filesystem/shallow.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/storage/filesystem/shallow.go b/storage/filesystem/shallow.go
index 4b2e2dc..173767c 100644
--- a/storage/filesystem/shallow.go
+++ b/storage/filesystem/shallow.go
@@ -41,6 +41,8 @@ func (s *ShallowStorage) Shallow() ([]plumbing.Hash, error) {
return nil, err
}
+ defer ioutil.CheckClose(f, &err)
+
var hash []plumbing.Hash
scn := bufio.NewScanner(f)