Fix getaddrinfo() memory leak

See antirez/redis#2012 for the leak causing unbounded memory growth.