From: Guus Sliepen Date: Mon, 3 Dec 2012 08:02:08 +0000 (+0100) Subject: Set a node's pointers to zero before trying to insert it into a tree. X-Git-Tag: release-1.1pre4~10 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=d19b00606576d19ef206e363ac709daf3bd00f25;p=tinc Set a node's pointers to zero before trying to insert it into a tree. --- diff --git a/src/splay_tree.c b/src/splay_tree.c index 07478f2f..54a46f28 100644 --- a/src/splay_tree.c +++ b/src/splay_tree.c @@ -398,6 +398,8 @@ splay_node_t *splay_insert_node(splay_tree_t *tree, splay_node_t *node) { splay_node_t *closest; int result; + node->left = node->right = node->parent = node->next = node->prev = NULL; + if(!tree->root) splay_insert_top(tree, node); else {