Skip to content

Commit d35bbe0

Browse files
sigprofJunio C Hamano
authored andcommitted
[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>
1 parent a95cb6f commit d35bbe0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fetch.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ static int process_tree(struct tree *tree)
4848
struct tree_entry_list *next = entry->next;
4949
if (process(entry->item.any))
5050
return -1;
51+
free(entry->name);
5152
free(entry);
5253
entry = next;
5354
}

0 commit comments

Comments
 (0)