Hostname memory leak fix.
Removing dep on stack variable.