From: Junio C Hamano Date: Tue, 22 Aug 2017 17:29:15 +0000 (-0700) Subject: Merge branch 'rs/unpack-entry-leakfix' X-Git-Tag: v2.15.0-rc0~159 X-Git-Url: http://git.bitbasher.net/?a=commitdiff_plain;h=030e2938d2a6f864da37a6b0a29aeb3e16994895;p=git.git Merge branch 'rs/unpack-entry-leakfix' Memory leak in an error codepath has been plugged. * rs/unpack-entry-leakfix: sha1_file: release delta_stack on error in unpack_entry() --- 030e2938d2a6f864da37a6b0a29aeb3e16994895 diff --cc sha1_file.c index 607b34ea53,ba282c06bd..81d03ce859 --- a/sha1_file.c +++ b/sha1_file.c @@@ -2676,11 -2596,10 +2676,12 @@@ void *unpack_entry(struct packed_git *p free(external_base); } - *final_type = type; - *final_size = size; + if (final_type) + *final_type = type; + if (final_size) + *final_size = size; + out: unuse_pack(&w_curs); if (delta_stack != small_delta_stack)