Browse Source

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

tags/v1.10.0-rc2
zeripath 5 years ago committed by GitHub
parent
commit
4e85c8e0d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      routers/repo/download.go

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

Loading…
Cancel
Save