Skip to content

Commit

Permalink
Free CF list after use
Browse files Browse the repository at this point in the history
  • Loading branch information
mjfh committed Jun 13, 2024
1 parent 439fa72 commit 7930eac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions rocksdb/rocksdb.nim
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ proc listRocksDbCFs*(
bailOnErrors(errors)

var cfs: seq[string]
for n in 0 ..< lencf:
if cList[n].isNil:
return err("short reply")
cfs.add $cList[n]
if not cList.isNil:
for n in 0 ..< lencf:
if cList[n].isNil:
return err("short reply")
cfs.add $cList[n]
rocksdb_free(cList)

ok cfs

Expand Down

0 comments on commit 7930eac

Please sign in to comment.