Skip to content

Commit

Permalink
[PATCH] fetch.c: Plug memory leak in process_tree()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sergey Vlasov authored and Junio C Hamano committed Sep 23, 2005
1 parent a95cb6f commit d35bbe0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d35bbe0

Please sign in to comment.