From: Arran Cudbard-Bell Date: Tue, 2 Feb 2021 11:52:17 +0000 (+0000) Subject: Only run the free walker if we have a free callback X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a60cc1d740d6254c3a3e6370cc8142ba4cd22df;p=thirdparty%2Ffreeradius-server.git Only run the free walker if we have a free callback The rest of the nodes are parented off the tree --- diff --git a/src/lib/util/rbtree.c b/src/lib/util/rbtree.c index 86561d1a37..da0b4be251 100644 --- a/src/lib/util/rbtree.c +++ b/src/lib/util/rbtree.c @@ -112,7 +112,7 @@ static int _tree_free(rbtree_t *tree) /* * walk the tree, deleting the nodes... */ - if (tree->root != NIL) free_walker(tree, tree->root); + if ((tree->root != NIL) && tree->free) free_walker(tree, tree->root); #ifndef NDEBUG tree->magic = 0;