Add a missing assert, call to removeNode
This commit is contained in:
@@ -1636,6 +1636,7 @@ void maybeDownsize(Node *self, WriteContext *tls, ConflictSet::Impl *impl,
|
|||||||
case Type_Node3: {
|
case Type_Node3: {
|
||||||
auto *self3 = (Node3 *)self;
|
auto *self3 = (Node3 *)self;
|
||||||
if (self->numChildren == 0) {
|
if (self->numChildren == 0) {
|
||||||
|
assert(self->entryPresent);
|
||||||
auto *newSelf = tls->allocate<Node0>(self->partialKeyLen);
|
auto *newSelf = tls->allocate<Node0>(self->partialKeyLen);
|
||||||
newSelf->copyChildrenAndKeyFrom(*self3);
|
newSelf->copyChildrenAndKeyFrom(*self3);
|
||||||
getInTree(self, impl) = newSelf;
|
getInTree(self, impl) = newSelf;
|
||||||
@@ -1755,6 +1756,7 @@ void destroyTree(Node *root, int64_t *entriesErased) {
|
|||||||
default: // GCOVR_EXCL_LINE
|
default: // GCOVR_EXCL_LINE
|
||||||
__builtin_unreachable(); // GCOVR_EXCL_LINE
|
__builtin_unreachable(); // GCOVR_EXCL_LINE
|
||||||
}
|
}
|
||||||
|
removeNode(n);
|
||||||
safe_free(n, n->size());
|
safe_free(n, n->size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user