sha1_file: release delta_stack on error in unpack_entry()
authorRené Scharfe <l.s.r@web.de>
Thu, 10 Aug 2017 09:42:21 +0000 (11:42 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 10 Aug 2017 22:42:46 +0000 (15:42 -0700)
commit896dca3ab75de69e292d7863d704b3e7a8f1a59d
treec1e93dc5b2b5d209797793bf690c912b91300dc8
parent3d9c5b5c4461957fbbc0479e037990db04ebb740
sha1_file: release delta_stack on error in unpack_entry()

When unpack_entry() encounters a broken packed object, it returns early.
It adjusts the reference count of the pack window, but leaks the buffer
for a big delta stack in case the small automatic one was not enough.
Jump to the cleanup code at end instead, which takes care of that.

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