forked from gitea/gitea
1
0
Fork 0

Add missed close in ServeBlobLFS (#8527) (#8542)

This commit is contained in:
zeripath 2019-10-16 20:32:15 +01:00 committed by GitHub
parent 34b8becef0
commit 4e85c8e0d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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)
}