aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem
diff options
context:
space:
mode:
authorKyungmin Bae <kyungmin.bae@devsisters.com>2020-05-24 02:29:58 +0900
committerKyungmin Bae <kyungmin.bae@devsisters.com>2020-05-24 02:29:58 +0900
commit10199949b9e5a71f72241c4bb23f3d733287065c (patch)
tree52b3efdb1944d9c833522d32a0af5c4b275a3ab6 /storage/filesystem
parent6d8103df45ce09ffd5323b4ef46d26440400a54f (diff)
downloadgo-git-10199949b9e5a71f72241c4bb23f3d733287065c.tar.gz
Close Reader & Writer of EncodedObject after use
Diffstat (limited to 'storage/filesystem')
-rw-r--r--storage/filesystem/object.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/storage/filesystem/object.go b/storage/filesystem/object.go
index 862cc1b..7437174 100644
--- a/storage/filesystem/object.go
+++ b/storage/filesystem/object.go
@@ -408,6 +408,8 @@ func (s *ObjectStorage) getFromUnpacked(h plumbing.Hash) (obj plumbing.EncodedOb
return nil, err
}
+ defer ioutil.CheckClose(w, &err)
+
s.objectCache.Put(obj)
_, err = io.Copy(w, r)