X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_avltree.c;h=12310d3fa771d528fabc5ac313f76d42ed71aef6;hb=c6da31fb30c2fb1d131f92efcde0b3ec9a010b2c;hp=3e258e95d8c6834271823cab5aa5cddfc3a4845a;hpb=2c2affa00540642ed087f0f15178eb8cd653fdac;p=collectd.git 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); }