Revision fee6faa2

View differences:

libavutil/tree.c
135 135
    }
136 136
}
137 137

  
138
void av_tree_destroy_free_elem(AVTreeNode *t){
139
    if(t){
140
        av_tree_destroy_free_elem(t->child[0]);
141
        av_tree_destroy_free_elem(t->child[1]);
142
        av_free(t->elem);
143
        av_free(t);
144
    }
145
}
146

  
138 147
#if 0
139 148
void av_tree_enumerate(AVTreeNode *t, void *opaque, int (*cmp)(void *opaque, void *elem), int (*enu)(void *opaque, void *elem)){
140 149
    if(t){
libavutil/tree.h
78 78
 */
79 79
void *av_tree_insert(struct AVTreeNode **rootp, void *key, int (*cmp)(void *key, const void *b), struct AVTreeNode **next);
80 80
void av_tree_destroy(struct AVTreeNode *t);
81
void av_tree_destroy_free_elem(struct AVTreeNode *t);
81 82

  
82 83
#endif /* AVUTIL_TREE_H */

Also available in: Unified diff