Fix for segfault when 'getaddrinfo failed'.

`error_code` is zero, but `stream` is also NULL.
Fixes #5.