diff options
author | zeripath <art27@cantab.net> | 2019-10-16 20:32:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-16 20:32:15 +0100 |
commit | 4e85c8e0d8db6171b34b2fa331c4a6eb86f45281 (patch) | |
tree | 7595c3a8eb3bc75a0642148f0db8ce2676a4b091 /routers | |
parent | 34b8becef074bfe3487624642d669dfd4acaeb87 (diff) | |
download | gitea-4e85c8e0d8db6171b34b2fa331c4a6eb86f45281.tar.gz gitea-4e85c8e0d8db6171b34b2fa331c4a6eb86f45281.zip |
Add missed close in ServeBlobLFS (#8527) (#8542)
Diffstat (limited to 'routers')
-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 2da8b109ca..6f10fe36a3 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) } |