summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavutil/tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/tree.c b/libavutil/tree.c
index 64653aa..bf485ab 100644
--- a/libavutil/tree.c
+++ b/libavutil/tree.c
@@ -128,9 +128,11 @@ void *av_tree_insert(AVTreeNode **tp, void *key, int (*cmp)(void *key, const voi
}
void av_tree_destroy(AVTreeNode *t){
+ if(t){
av_tree_destroy(t->child[0]);
av_tree_destroy(t->child[1]);
av_free(t);
+ }
}
#if 0
OpenPOWER on IntegriCloud