From e1505d62507dde9694f87abe6f82a5887e3c12d8 Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 16 Oct 2019 06:55:31 +0100 Subject: [PATCH] Add missed close in ServeBlobLFS (#8527) --- routers/repo/download.go | 5 +++++ 1 file changed, 5 insertions(+) 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) }