Always remove a node from the UDP tree before freeing it.

Valgrind caught tinc reading free'd memory during a purge(). This was caused by
first removing it from the main node tree, which will already call free_node(),
and then removing it from the UDP tree. This might cause spurious segmentation
faults.
This commit is contained in:
Guus Sliepen 2009-09-08 16:35:28 +02:00
parent de029ce460
commit 5a7fc58012

View file

@ -137,8 +137,8 @@ void node_del(node_t *n)
edge_del(e);
}
avl_delete(node_tree, n);
avl_delete(node_udp_tree, n);
avl_delete(node_tree, n);
}
node_t *lookup_node(char *name)