From e92fa514a9ade4526ad5c119e3f12e69621c97b6 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Mon, 6 Sep 2010 15:40:16 -0600 Subject: [PATCH] cache_tree_free: Fix small memory leak Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- cache-tree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.30.2