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>
This commit is contained in:
Nicolas Pitre 2008-10-23 15:05:59 -04:00 коммит произвёл Junio C Hamano
Родитель 2b5c208f5b
Коммит 9ed19614d4
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -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);