mirror of
https://gitlab.xiph.org/xiph/icecast-common.git
synced 2024-12-04 14:46:31 -05:00
Free tree if we fail to allocate root node.
svn path=/icecast/trunk/avl/; revision=10975
This commit is contained in:
parent
8a87821bdc
commit
4dd3524428
@ -70,6 +70,7 @@ avl_tree_new (avl_key_compare_fun_type compare_fun,
|
|||||||
} else {
|
} else {
|
||||||
avl_node * root = avl_node_new((void *)NULL, (avl_node *) NULL);
|
avl_node * root = avl_node_new((void *)NULL, (avl_node *) NULL);
|
||||||
if (!root) {
|
if (!root) {
|
||||||
|
free (t);
|
||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
t->root = root;
|
t->root = root;
|
||||||
|
Loading…
Reference in New Issue
Block a user