@matheusbsbs / matheus-bagliano / commits / 9ed19614d4
Fork 0

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 <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nicolas Pitre committed Oct 23, 2008 at 15:05 UTC 9ed19614d4afd86a8d51072ed34c2c44554c3b54
1 file changed +3 -1
index-pack.c
+3 -1
@@ -550,8 +550,10 @@ static void find_unresolved_deltas(struct base_data *base,
550 find_delta_children(&base_spec, &ofs_first, &ofs_last);
551 }
552
553 - if (ref_last == -1 && ofs_last == -1)
553 + if (ref_last == -1 && ofs_last == -1) {
554 + free(base->data);
555 return;
556 + }
557
558 link_base_data(prev_base, base);
559