summaryrefslogtreecommitdiff
path: root/index-pack.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2008-10-23 19:05:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-10-24 05:32:43 (GMT)
commit9ed19614d4afd86a8d51072ed34c2c44554c3b54 (patch)
tree515ec337460fc3e1c696c51c6dc02e11b82fb62b /index-pack.c
parent2b5c208f5bd371ea5527046384f9955dbbceb188 (diff)
downloadgit-9ed19614d4afd86a8d51072ed34c2c44554c3b54.zip
git-9ed19614d4afd86a8d51072ed34c2c44554c3b54.tar.gz
git-9ed19614d4afd86a8d51072ed34c2c44554c3b54.tar.bz2
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>
Diffstat (limited to 'index-pack.c')
-rw-r--r--index-pack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/index-pack.c b/index-pack.c
index f109a00..7db7fbb 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);