Skip to content

Commit e6e1647

Browse files
authored
Fix memory leak during bottom-up build (couchbase#13)
1 parent cdc01c3 commit e6e1647

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/forestdb.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4741,6 +4741,7 @@ fdb_status _fdb_bottom_up_index_build(fdb_kvs_handle *handle)
47414741
_fdb_bottom_up_index_btreeblk_end,
47424742
handle->bottom_up_build_entries);
47434743
handle->trie->root_bid = new_key_trie.root_bid;
4744+
hbtrie_free(&new_key_trie);
47444745

47454746
// Build seq-index next.
47464747
if (handle->seqtrie) {
@@ -4757,6 +4758,7 @@ fdb_status _fdb_bottom_up_index_build(fdb_kvs_handle *handle)
47574758
_fdb_bottom_up_index_btreeblk_end,
47584759
handle->bottom_up_build_entries);
47594760
handle->seqtrie->root_bid = new_seq_trie.root_bid;
4761+
hbtrie_free(&new_seq_trie);
47604762
} else if (handle->seqtree) {
47614763
// Not supported yet.
47624764
}

0 commit comments

Comments
 (0)