diff --git a/ConflictSet.cpp b/ConflictSet.cpp index b8a8e8e..c830767 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -1636,6 +1636,7 @@ void maybeDownsize(Node *self, WriteContext *tls, ConflictSet::Impl *impl, case Type_Node3: { auto *self3 = (Node3 *)self; if (self->numChildren == 0) { + assert(self->entryPresent); auto *newSelf = tls->allocate(self->partialKeyLen); newSelf->copyChildrenAndKeyFrom(*self3); getInTree(self, impl) = newSelf; @@ -1755,6 +1756,7 @@ void destroyTree(Node *root, int64_t *entriesErased) { default: // GCOVR_EXCL_LINE __builtin_unreachable(); // GCOVR_EXCL_LINE } + removeNode(n); safe_free(n, n->size()); } }