From: Junio C Hamano Date: Tue, 16 Aug 2011 17:51:52 GMT Subject: Re: [PATCH 6/7] sequencer: Expose API to cherry-picking machinery Message-ID: <7v39h1i6rr.fsf@alter.siamese.dyndns.org> In-Reply-To: <20110814152204.GJ18466@elie.gateway.2wire.net> Jonathan Nieder writes: > Subject: revert: plug memory leak in "cherry-pick root commit" codepath > > The empty tree passed as common ancestor to merge_trees() when > cherry-picking a parentless commit is allocated on the heap and never > freed. Thanks for noticing, but shouldn't we be just using lookup_tree((const unsigned char *)EMPTY_TREE_SHA1_BIN) or something, instead of hand-crafting a fake tree object?