aboutsummaryrefslogtreecommitdiffstats
path: root/modules/repofiles/content.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/repofiles/content.go')
-rw-r--r--modules/repofiles/content.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/repofiles/content.go b/modules/repofiles/content.go
index d7d43ef9d1..aed98c33a8 100644
--- a/modules/repofiles/content.go
+++ b/modules/repofiles/content.go
@@ -59,6 +59,7 @@ func GetContentsOrList(repo *models.Repository, treePath, ref string) (interface
if err != nil {
return nil, err
}
+ defer gitRepo.Close()
// Get the commit object for the ref
commit, err := gitRepo.GetCommit(ref)
@@ -117,6 +118,7 @@ func GetContents(repo *models.Repository, treePath, ref string, forList bool) (*
if err != nil {
return nil, err
}
+ defer gitRepo.Close()
// Get the commit object for the ref
commit, err := gitRepo.GetCommit(ref)