Simplify fake getname/addrinfo() functions, possibly fixing freeing a NULL pointer.