If memory allocation for stdout buffer fails, we
drop the stdout read from the link and return an empty buffer.