Skip to content

Commit

Permalink
index-pack: don't leak leaf delta result
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Pitre authored and Junio C Hamano committed Oct 24, 2008
1 parent 2b5c208 commit 9ed1961
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9ed1961

Please sign in to comment.