From: Junio C Hamano Date: Tue, 9 Jan 2007 22:07:59 +0000 (-0800) Subject: builtin-archive: do not free a tree held by the object layer. X-Git-Tag: v1.5.0-rc1~35 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2740b2b8539a322bc73f46c45c569503900c5dc1;p=git.git 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 --- diff --git a/builtin-archive.c b/builtin-archive.c index 391cf4391..32737d316 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;