From 24cea32efb90b830d2282dff4a3fe5f7ddc1c0d9 Mon Sep 17 00:00:00 2001 From: thorkill Date: Wed, 1 Jul 2015 16:57:05 +0200 Subject: [PATCH] Fix memory leak in splay_delete_tree Use splay_delete_node to properly decrease counters and release memory. --- src/splay_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/splay_tree.c b/src/splay_tree.c index 2c5baab7..53bdafb5 100644 --- a/src/splay_tree.c +++ b/src/splay_tree.c @@ -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);