Skip to content

Commit

Permalink
Fix a resource leak when open a lfs file
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Dec 6, 2022
1 parent 77f5035 commit ee84390
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion routers/web/repo/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ func renderReadmeFile(ctx *context.Context, readmeFile *namedBlob, readmeTreelin
isLFSFile = true

// OK read the lfs object
var err error
dataRc.Close()

dataRc, err = lfs.ReadMetaObject(pointer)
if err != nil {
ctx.ServerError("ReadMetaObject", err)
Expand Down

0 comments on commit ee84390

Please sign in to comment.