From: Nicolas Pitre Date: Thu, 23 Oct 2008 19:05:59 +0000 (-0400) Subject: index-pack: don't leak leaf delta result X-Git-Tag: v1.6.1-rc1~94^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9ed19614d4afd86a8d51072ed34c2c44554c3b54;p=git.git index-pack: don't leak leaf delta result Another (but minor this time) fallout from commit 9441b61 (index-pack: rationalize delta resolution code, 2008-10-17). Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- diff --git a/index-pack.c b/index-pack.c index f109a0027..7db7fbb56 100644 --- a/index-pack.c +++ b/index-pack.c @@ -550,8 +550,10 @@ static void find_unresolved_deltas(struct base_data *base, find_delta_children(&base_spec, &ofs_first, &ofs_last); } - if (ref_last == -1 && ofs_last == -1) + if (ref_last == -1 && ofs_last == -1) { + free(base->data); return; + } link_base_data(prev_base, base);