If getaddrinfo() fails, it's not safe to dereference the struct addrinfo* it