Skip to content

Commit c1152b1

Browse files
zeripathlunny
authored andcommitted
Add missed close in ServeBlobLFS (#8527) (#8543)
1 parent cb31f88 commit c1152b1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

routers/repo/download.go

+5
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ func ServeBlobOrLFS(ctx *context.Context, blob *git.Blob) error {
8484
if err != nil {
8585
return err
8686
}
87+
defer func() {
88+
if err = lfsDataRc.Close(); err != nil {
89+
log.Error("ServeBlobOrLFS: Close: %v", err)
90+
}
91+
}()
8792
return ServeData(ctx, ctx.Repo.TreePath, lfsDataRc)
8893
}
8994

0 commit comments

Comments
 (0)