When __resolv_context_get in get_nss_addresses returns NULL due to out-of-memory, getaddrinfo return EAI_NONAME instead of EAI_MEMORY.
Fixed by commit 5eabdb6a6a.