Skip to content

Commit 4e85c8e

Browse files
authored
Add missed close in ServeBlobLFS (#8527) (#8542)
1 parent 34b8bec commit 4e85c8e

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)