Commit 36dc9b0c authored by Michael Smith's avatar Michael Smith

Free tree if we fail to allocate root node.

svn path=/icecast/trunk/avl/; revision=10975
parent 2848a707
......@@ -70,6 +70,7 @@ avl_tree_new (avl_key_compare_fun_type compare_fun,
} else {
avl_node * root = avl_node_new((void *)NULL, (avl_node *) NULL);
if (!root) {
free (t);
return NULL;
} else {
t->root = root;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment