Skip to content

Commit

Permalink
fix minor memory leak in get_tree_entry()
Browse files Browse the repository at this point in the history
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
René Scharfe authored and Junio C Hamano committed Feb 14, 2010
1 parent 341d9a4 commit ef00650
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tree-walk.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ int get_tree_entry(const unsigned char *tree_sha1, const char *name, unsigned ch

if (name[0] == '\0') {
hashcpy(sha1, root);
free(tree);
return 0;
}

Expand Down

0 comments on commit ef00650

Please sign in to comment.