summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-10-25 17:41:40 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2023-10-25 17:41:40 +0200
commit465a67bfaf39ec4cf550cc3c355669918c46a423 (patch)
tree4488cd0988a376a46193393f8044f5cb3d3adc5a /src
parentMerge pull request #1594 from mips64-el/master (diff)
downloadnheko-465a67bfaf39ec4cf550cc3c355669918c46a423.tar.xz
Properly close cursors before commit and db deletion
Diffstat (limited to 'src')
-rw-r--r--src/Cache.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp
index bfe27c30..a5d970ca 100644
--- a/src/Cache.cpp
+++ b/src/Cache.cpp
@@ -1748,9 +1748,11 @@ Cache::runMigrations()
                          combineOlmSessionKeyFromCurveAndSessionId(curveKey, session_id),
                          json);
                    }
+                   olmCursor.close();
 
                    oldDb.drop(txn, true);
                }
+               dbNames.close();
 
                if (doCommit) txn.commit();
            } catch (const lmdb::error &e) {