Check if node is the EmptyNode() before trying to delete it
Fixes: https://tracker.ceph.com/issues/72446
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
deallocate(node_type::InternalSize(), node);
}
void delete_leaf_node(node_type *node) {
- node->destroy(mutable_allocator());
- deallocate(node_type::LeafSize(node->max_count()), node);
+ if (node != EmptyNode()) {
+ node->destroy(mutable_allocator());
+ deallocate(node_type::LeafSize(node->max_count()), node);
+ }
}
// Rebalances or splits the node iter points to.