builtin-archive: do not free a tree held by the object layer.
authorJunio C Hamano <junkio@cox.net>
Tue, 9 Jan 2007 22:07:59 +0000 (14:07 -0800)
committerJunio C Hamano <junkio@cox.net>
Tue, 9 Jan 2007 22:07:59 +0000 (14:07 -0800)
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>
builtin-archive.c

index 391cf43911a16ec49862c18b7dd4f1f094d49de8..32737d31621e8d1a900d944f97fcaae43d56a12e 100644 (file)
@@ -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;