Skip to content

Commit

Permalink
close cursor inside ListDBI method (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov authored Mar 7, 2024
1 parent 70f5af5 commit a15c4f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mdbx/txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,7 @@ func (txn *Txn) ListDBI() (res []string, err error) {
if err != nil {
return nil, err
}
defer c.Close()
for k, _, err := c.Get(nil, nil, First); k != nil; k, _, err = c.Get(nil, nil, Next) {
if err != nil {
return nil, err
Expand All @@ -781,5 +782,5 @@ func (txn *Txn) EnvWarmup(flags uint, timeout time.Duration) error {
}

func (txn *Txn) CHandle() unsafe.Pointer {
return unsafe.Pointer(txn._txn);
return unsafe.Pointer(txn._txn)
}

0 comments on commit a15c4f5

Please sign in to comment.