From: Elijah Newren Date: Mon, 6 Sep 2010 21:40:16 +0000 (-0600) Subject: cache_tree_free: Fix small memory leak X-Git-Tag: v1.7.3-rc1~3^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e92fa514a9ade4526ad5c119e3f12e69621c97b6;p=git.git cache_tree_free: Fix small memory leak Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- 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;