Return ENOMEM if one of the buffer cannot be created even with the minimal size. This should avoid subsequent spurious ENOMEM errors from e.g. write(2) when buffer cannot be allocated later.
Style cleanup is for separate commit.
Reported by: Keno Fischer <keno@juliacomputing.com>