Skip to content

Commit

Permalink
Add missed close in ServeBlobLFS (#8527)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeripath authored Oct 16, 2019
1 parent 31655aa commit e1505d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions routers/repo/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit e1505d6

Please sign in to comment.