From 7930eacaf3c0d208dfd01ea3bccaa8c27701e213 Mon Sep 17 00:00:00 2001 From: Jordan Hrycaj Date: Thu, 13 Jun 2024 12:21:43 +0100 Subject: [PATCH] Free CF list after use --- rocksdb/rocksdb.nim | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rocksdb/rocksdb.nim b/rocksdb/rocksdb.nim index 510a414..a04afe3 100644 --- a/rocksdb/rocksdb.nim +++ b/rocksdb/rocksdb.nim @@ -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