summaryrefslogtreecommitdiff
path: root/tree-walk.c
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2010-02-14 10:56:46 +0100
committerJunio C Hamano <gitster@pobox.com>2010-02-14 03:04:20 -0800
commitef0065034a68edfc0ffed9965bb895073ad710db (patch)
treea6d527eb08c7fc9ad09ce60eaa30074d89c6014c /tree-walk.c
parent341d9a48cc4a6993f952c5c13417ba88227ef427 (diff)
downloadgit-ef0065034a68edfc0ffed9965bb895073ad710db.tar.gz
fix minor memory leak in get_tree_entry()
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree-walk.c')
-rw-r--r--tree-walk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tree-walk.c b/tree-walk.c
index 02e2aed773..a0fe88c55d 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -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;
}