zlib code add OOM checks remove buffer expansion on rx path

Here testing with the test serer and chrome 25, the buffer expansion
code on Rx was triggered by a valid no data output condition and looped
until it exhausted all memory.

This patch adds OOM check to all malloc()s and removes the buffer expansion
code on the rx path... leaving the code on tx path for now.

Signed-off-by: Andy Green <andy.green@linaro.org>
2 files changed