Skip to content

Commit

Permalink
Fix memory leak because the database is corrupted
Browse files Browse the repository at this point in the history
Signed-off-by: fengwei0328 <[email protected]>
  • Loading branch information
fengwei0328 committed Dec 13, 2024
1 parent 92c7414 commit b362fdb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ func (c *Cursor) goToFirstElementOnTheStack() {
pgId = ref.page.BranchPageElement(uint16(ref.index)).Pgid()
}
p, n := c.bucket.pageNode(pgId)
if p.flags == 16 {
break
}
c.stack = append(c.stack, elemRef{page: p, node: n, index: 0})
}
}
Expand Down

0 comments on commit b362fdb

Please sign in to comment.