aboutsummaryrefslogtreecommitdiff
path: root/cache-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-09-06 17:40:18 -0700
committerJunio C Hamano <gitster@pobox.com>2010-09-06 17:40:18 -0700
commit7505ae272bad53c6451f34ff5f04ad24f29b6dd9 (patch)
tree0dab4d35ffe6f97b955a23c07fa6d8ce5edc2dec /cache-tree.c
parent79d532c36a5d275ed237e196f36054f3c45d70aa (diff)
parent04df568be53c42d07aea393effc7c5653f245d9a (diff)
downloadgit-7505ae272bad53c6451f34ff5f04ad24f29b6dd9.tar.gz
git-7505ae272bad53c6451f34ff5f04ad24f29b6dd9.tar.xz
Merge branch 'maint'
* maint: revert: Fix trivial comment style issue cache_tree_free: Fix small memory leak Conflicts: builtin/revert.c
Diffstat (limited to 'cache-tree.c')
-rw-r--r--cache-tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cache-tree.c b/cache-tree.c
index c60cf9140..f755590da 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -22,8 +22,10 @@ void cache_tree_free(struct cache_tree **it_p)
if (!it)
return;
for (i = 0; i < it->subtree_nr; i++)
- if (it->down[i])
+ if (it->down[i]) {
cache_tree_free(&it->down[i]->cache_tree);
+ free(it->down[i]);
+ }
free(it->down);
free(it);
*it_p = NULL;