1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

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

This commit is contained in:
zeripath 2019-10-16 17:05:23 +01:00 committed by Lunny Xiao
parent cb31f88383
commit c1152b15fe

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