Update draft release notes to 2.2
[gitweb.git] / sha1_file.c
index 95afd209107277da3154226dd08bd8040a9097b5..c08c0cbea805b38104504b9b51266949affb6991 100644 (file)
@@ -1923,7 +1923,9 @@ static void *unpack_compressed_entry(struct packed_git *p,
        git_zstream stream;
        unsigned char *buffer, *in;
 
-       buffer = xmallocz(size);
+       buffer = xmallocz_gently(size);
+       if (!buffer)
+               return NULL;
        memset(&stream, 0, sizeof(stream));
        stream.next_out = buffer;
        stream.avail_out = size + 1;