Commit fccb3e6c authored by David Lawrence's avatar David Lawrence
Browse files

When joining nodes, set parent pointers of the left and right children of

the upper node (if they exist) to point to the new node.
parent 092b4e53
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: rbt.c,v 1.80 2000/05/19 04:42:08 tale Exp $ */
/* $Id: rbt.c,v 1.81 2000/05/19 05:58:48 tale Exp $ */
/* Principal Authors: DCL */
......@@ -1365,8 +1365,12 @@ join_nodes(dns_rbt_t *rbt, dns_rbtnode_t *node) {
else
RIGHT(PARENT(node)) = newnode;
if (LEFT(node) != NULL)
PARENT(LEFT(node)) = newnode;
if (RIGHT(node) != NULL)
PARENT(RIGHT(node)) = newnode;
if (DOWN(down) != NULL)
PARENT(DOWN(down)) = newnode;
PARENT(DOWN(down)) = newnode;
isc_mem_put(rbt->mctx, node, NODE_SIZE(node));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment