summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routers/repo/download.go5
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)
}