From a025c64b24240387cfbca225ee030e8ed0929efa Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Thu, 7 Mar 2024 10:00:12 +0700 Subject: [PATCH] save --- mdbx/txn.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mdbx/txn.go b/mdbx/txn.go index d9e451f..fa1787b 100644 --- a/mdbx/txn.go +++ b/mdbx/txn.go @@ -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 @@ -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) }