projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15677f3
)
src/utils_avltree.c: Add sanity check to c_avl_destroy().
author
Florian Forster
<octo@collectd.org>
Sun, 27 May 2012 09:10:56 +0000
(11:10 +0200)
committer
Florian Forster
<octo@collectd.org>
Sun, 27 May 2012 09:10:56 +0000
(11:10 +0200)
src/utils_avltree.c
patch
|
blob
|
history
diff --git
a/src/utils_avltree.c
b/src/utils_avltree.c
index
3e258e9
..
12310d3
100644
(file)
--- 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);
}