Use freeaddrinfo, not free when freeing addrinfo memory