Re: [PATCH] get_tree_entry: map blank requested entry to tree root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> On Tue, Jan 09, 2007 at 04:57:11PM -0800, Junio C Hamano wrote:
>
>> I've noticed this while looking at your patch and fixed it in my
>> tree already.
>
> Thanks, I will stop looking, then. :)

-- >8 --
[PATCH] 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@xxxxxxx>
---
 builtin-archive.c |    1 -
 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;

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]