hesservbyname: Handle out-of-memory gracefully