Skip to content

Commit

Permalink
Fix: Ensure block stream is closed after use (#5085)
Browse files Browse the repository at this point in the history
Signed-off-by: sayalikukkar <[email protected]>
  • Loading branch information
Sayalikukkar authored Dec 20, 2024
1 parent 9510ab1 commit b3f6615
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/ledger/blkstorage/blockfile_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ func (mgr *blockfileMgr) syncIndex() error {
if stream, err = newBlockStream(mgr.rootDir, startFileNum, int64(startOffset), endFileNum); err != nil {
return err
}
defer stream.close()
var blockBytes []byte
var blockPlacementInfo *blockPlacementInfo

Expand Down

0 comments on commit b3f6615

Please sign in to comment.