sha1_file.c: do not die failing to malloc in unpack_compressed_entry
commit735efde838b68747e737e863427a4843a8efaddb
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 16 Aug 2014 03:08:03 +0000 (16 10:08 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Aug 2014 17:15:19 +0000 (18 10:15 -0700)
tree4cef9ebadedd09e57441e0bcba740418e9ba5395
parentf8bb1d94311b7438e7e9831b51ffb047b7ae65d7
sha1_file.c: do not die failing to malloc in unpack_compressed_entry

Fewer die() gives better control to the caller, provided that the
caller _can_ handle it. And in unpack_compressed_entry() case, it can,
because unpack_compressed_entry() already returns NULL if it fails to
inflate data.

A side effect from this is fsck continues to run when very large blobs
are present (and do not fit in memory).

Noticed-by: Dale R. Worley <worley@alum.mit.edu>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_file.c
t/t1050-large.sh