diff options
author | zeripath <art27@cantab.net> | 2019-10-16 06:55:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-16 06:55:31 +0100 |
commit | e1505d62507dde9694f87abe6f82a5887e3c12d8 (patch) | |
tree | 743ea5c95d20bf99da7f445687bfaaf69fdbee57 /routers/repo/download.go | |
parent | 31655aabfc397db203d39b468cad1ecbdc1879db (diff) | |
download | gitea-e1505d62507dde9694f87abe6f82a5887e3c12d8.tar.gz gitea-e1505d62507dde9694f87abe6f82a5887e3c12d8.zip |
Add missed close in ServeBlobLFS (#8527)
Diffstat (limited to 'routers/repo/download.go')
-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) } |