avutil/tree: fix memleaks
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 1 Aug 2013 09:23:45 +0000 (11:23 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 1 Aug 2013 09:29:12 +0000 (11:29 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/tree.c

index 643d0a9..e1b3197 100644 (file)
@@ -245,8 +245,10 @@ int main(int argc, char **argv)
             k = av_tree_find(root, (void *)(j + 1), cmp, NULL);
             if (k)
                 av_log(NULL, AV_LOG_ERROR, "removal failure %d\n", i);
+            av_free(node2);
         }
     }
+    av_free(node);
 
     av_tree_destroy(root);