mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 05:50:14 +00:00
getaddrinfo: translate ENOMEM to EAI_MEMORY (bug 31163)
When __resolv_context_get returns NULL due to out of memory, translate it to a return value of EAI_MEMORY.
This commit is contained in:
parent
4b00532e51
commit
5eabdb6a6a
@ -615,7 +615,14 @@ get_nss_addresses (const char *name, const struct addrinfo *req,
|
||||
function variant. */
|
||||
res_ctx = __resolv_context_get ();
|
||||
if (res_ctx == NULL)
|
||||
no_more = 1;
|
||||
{
|
||||
if (errno == ENOMEM)
|
||||
{
|
||||
result = -EAI_MEMORY;
|
||||
goto out;
|
||||
}
|
||||
no_more = 1;
|
||||
}
|
||||
|
||||
while (!no_more)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user