Browse Source

Busted ghost pointers

tree_alloc
Cameron Weinfurt 1 year ago
parent
commit
748cd262c3
  1. 3
      tree_alloc.c

3
tree_alloc.c

@ -322,6 +322,9 @@ void remove_node(TreeAlloc **root_ptr, TreeAlloc *node) {
node->left->parent = tmp;
}
// Make sure that it doesn't have any tree pointers it shouldn't have.
node->parent = node->left = node->right = NULL;
if (replace && replace->parent == NULL) {
#ifdef DEBUG
printf("=== PRE-REMOVE-FIXUP ===\n");

Loading…
Cancel
Save