summaryrefslogtreecommitdiff
path: root/fetch.c
diff options
context:
space:
mode:
authorSergey Vlasov <vsu@altlinux.ru>2005-09-23 12:28:18 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-09-23 21:30:45 (GMT)
commitd35bbe0b2e3765639c23978783a5319dfad33992 (patch)
treeda79d781c526938c2bfba5511c211b6fbf76196d /fetch.c
parenta95cb6fb6b247cf90bd0b1a8bf989a0b42ada775 (diff)
downloadgit-d35bbe0b2e3765639c23978783a5319dfad33992.zip
git-d35bbe0b2e3765639c23978783a5319dfad33992.tar.gz
git-d35bbe0b2e3765639c23978783a5319dfad33992.tar.bz2
[PATCH] fetch.c: Plug memory leak in process_tree()
When freeing a tree entry, must free its name too. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'fetch.c')
-rw-r--r--fetch.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fetch.c b/fetch.c
index 62f30d1..1a33ae9 100644
--- a/fetch.c
+++ b/fetch.c
@@ -48,6 +48,7 @@ static int process_tree(struct tree *tree)
struct tree_entry_list *next = entry->next;
if (process(entry->item.any))
return -1;
+ free(entry->name);
free(entry);
entry = next;
}