We were returning a pointer to a stack variable with the resolved hostname, which doesn't work. return a copy of the resolved ip address instead. Fixes #575256.