From da93b3172489e2eb51a93b0ab2238247a16c8e5b Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 27 May 2012 11:10:56 +0200 Subject: [PATCH] src/utils_avltree.c: Add sanity check to c_avl_destroy(). --- src/utils_avltree.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils_avltree.c b/src/utils_avltree.c index 3e258e95..12310d3f 100644 --- a/src/utils_avltree.c +++ b/src/utils_avltree.c @@ -485,6 +485,8 @@ c_avl_tree_t *c_avl_create (int (*compare) (const void *, const void *)) void c_avl_destroy (c_avl_tree_t *t) { + if (t == NULL) + return; free_node (t->root); free (t); } -- 2.30.2