Fix memory leak in splay_delete_tree

Use splay_delete_node to properly decrease counters and release memory.
This commit is contained in:
thorkill 2015-07-01 16:57:05 +02:00
parent faef01317b
commit 24cea32efb

View file

@ -544,7 +544,7 @@ void splay_delete(splay_tree_t *tree, void *data) {
void splay_delete_tree(splay_tree_t *tree) {
for(splay_node_t *node = tree->head, *next; node; node = next) {
next = node->next;
splay_free_node(tree, node);
splay_delete_node(tree, node);
}
splay_free_tree(tree);