sha1_file: release fallback base's memory in unpack_entry()
commit886ddf4777d119f0a420bdf55fba834c16c58069
authorRené Scharfe <l.s.r@web.de>
Sat, 25 Feb 2017 10:02:28 +0000 (25 11:02 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Feb 2017 19:00:30 +0000 (27 11:00 -0800)
tree296215f46527ab3af2f4a289fc7b7dd3840497e5
parentc3808ca6982b0ad7ee9b87eca9b50b9a24ec08b0
sha1_file: release fallback base's memory in unpack_entry()

If a pack entry that's used as a delta base is corrupt, unpack_entry()
marks it as unusable and then searches the object again in the hope that
it can be found in another pack or in a loose file.  The memory for this
external base object is never released.  Free it after use.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_file.c