summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 40b64d4)
raw | patch | inline | side by side (parent: 40b64d4)
author | Sergey Vlasov <vsu@altlinux.ru> | |
Wed, 3 Aug 2005 12:11:00 +0000 (16:11 +0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 3 Aug 2005 19:57:55 +0000 (12:57 -0700) |
- Call inflateEnd to release zlib state after use.
- After resolving delta, free base object data.
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
- After resolving delta, free base object data.
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
unpack-objects.c | patch | blob | history |
diff --git a/unpack-objects.c b/unpack-objects.c
index 19874d004a03531b12922f1bd48a28f18e8d2897..7e7be5cbd42e2f6ad178f1a2832673c8e9279e4e 100644 (file)
--- a/unpack-objects.c
+++ b/unpack-objects.c
stream.next_in = fill(1);
stream.avail_in = len;
}
+ inflateEnd(&stream);
return buf;
}
unsigned long base_size;
char type[20];
unsigned char base_sha1[20];
+ int result;
memcpy(base_sha1, fill(20), 20);
use(20);
base = read_sha1_file(base_sha1, type, &base_size);
if (!base)
die("failed to read delta-pack base object %s", sha1_to_hex(base_sha1));
- return resolve_delta(type, base, base_size, delta_data, delta_size);
+ result = resolve_delta(type, base, base_size, delta_data, delta_size);
+ free(base);
+ return result;
}
static void unpack_one(unsigned nr, unsigned total)