Code

fast-import: leakfix for 'ls' of dirty trees
[git.git] / fast-import.c
index 6c37b8400a143db55e3e16c6a3af788aa0467322..fff285cd0f73ca2bfe5b76aa3d87a156ad7808ff 100644 (file)
@@ -2987,6 +2987,8 @@ static void parse_ls(struct branch *b)
                store_tree(&leaf);
 
        print_ls(leaf.versions[1].mode, leaf.versions[1].sha1, p);
+       if (leaf.tree)
+               release_tree_content_recursive(leaf.tree);
        if (!b || root != &b->branch_tree)
                release_tree_entry(root);
 }