From 46a247f8c11e580d85ef6378848a15e17b8b5401 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Tue, 17 Apr 2018 14:28:18 +0200 Subject: storage: filesystem, close shallow file when read MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Máximo Cuadros --- storage/filesystem/shallow.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'storage/filesystem') 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) -- cgit