summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-01-09 22:07:59 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-01-09 22:07:59 (GMT)
commit2740b2b8539a322bc73f46c45c569503900c5dc1 (patch)
tree4958b65d1f0f2f3a837d8bba7cb16fb7c58276d8
parent240897e908e48e8f8c8d5555522afe255b3b734b (diff)
downloadgit-2740b2b8539a322bc73f46c45c569503900c5dc1.zip
git-2740b2b8539a322bc73f46c45c569503900c5dc1.tar.gz
git-2740b2b8539a322bc73f46c45c569503900c5dc1.tar.bz2
builtin-archive: do not free a tree held by the object layer.
Found by running "git archive --format=tar HEAD" in Documentation/ directory. It's surprising that nobody has noticed this from the beginning... Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--builtin-archive.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/builtin-archive.c b/builtin-archive.c
index 391cf43..32737d3 100644
--- a/builtin-archive.c
+++ b/builtin-archive.c
@@ -137,7 +137,6 @@ void parse_treeish_arg(const char **argv, struct archiver_args *ar_args,
if (err || !S_ISDIR(mode))
die("current working directory is untracked");
- free(tree);
tree = parse_tree_indirect(tree_sha1);
}
ar_args->tree = tree;