cache_tree_free: Fix small memory leak
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
af24059fa2
commit
e92fa514a9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user