Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 46a247f

Browse files
committed
storage: filesystem, close shallow file when read
Signed-off-by: Máximo Cuadros <[email protected]>
1 parent 60fd949 commit 46a247f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

storage/filesystem/shallow.go

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ func (s *ShallowStorage) Shallow() ([]plumbing.Hash, error) {
4141
return nil, err
4242
}
4343

44+
defer ioutil.CheckClose(f, &err)
45+
4446
var hash []plumbing.Hash
4547

4648
scn := bufio.NewScanner(f)

0 commit comments

Comments
 (0)