Skip to content

Commit

Permalink
builtin-archive: do not free a tree held by the object layer.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Jan 9, 2007
1 parent 240897e commit 2740b2b
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion builtin-archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2740b2b

Please sign in to comment.