fix warnings

Prevent use of uninitialized variable and removed a now unused
cleanup function for freeaddrinfo