diff --git a/routers/repo/commit.go b/routers/repo/commit.go index bb98ab60ae3..fdfbe3402e9 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -278,6 +278,7 @@ func Diff(ctx *context.Context) { ctx.ServerError("Repo.GitRepo.GetCommit", err) return } + defer gitRepo.Close() repoPath = ctx.Repo.Repository.WikiPath() } else { gitRepo = ctx.Repo.GitRepo