diff options
author | zeripath | 2019-10-16 17:05:23 +0100 |
---|---|---|
committer | Lunny Xiao | 2019-10-17 00:05:23 +0800 |
commit | c1152b15fe9847693408be853365f2e4d68c073d (patch) | |
tree | fd673496e9796b32d503e4075b6183a0c38cd2bd | |
parent | cb31f883830eb5c711b3334e0514b0f75a4c5171 (diff) |
Add missed close in ServeBlobLFS (#8527) (#8543)
-rw-r--r-- | routers/repo/download.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/repo/download.go b/routers/repo/download.go index 2da8b109c..6f10fe36a 100644 --- a/routers/repo/download.go +++ b/routers/repo/download.go @@ -84,6 +84,11 @@ func ServeBlobOrLFS(ctx *context.Context, blob *git.Blob) error { if err != nil { return err } + defer func() { + if err = lfsDataRc.Close(); err != nil { + log.Error("ServeBlobOrLFS: Close: %v", err) + } + }() return ServeData(ctx, ctx.Repo.TreePath, lfsDataRc) } |