projects
/
platform
/
upstream
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b00532
)
getaddrinfo: translate ENOMEM to EAI_MEMORY (bug 31163)
author
Andreas Schwab
<schwab@suse.de>
Wed, 6 Dec 2023 13:48:22 +0000
(14:48 +0100)
committer
Andreas Schwab
<schwab@suse.de>
Tue, 2 Jan 2024 10:10:42 +0000
(11:10 +0100)
When __resolv_context_get returns NULL due to out of memory, translate it
to a return value of EAI_MEMORY.
nss/getaddrinfo.c
patch
|
blob
|
history
diff --git
a/nss/getaddrinfo.c
b/nss/getaddrinfo.c
index a225f9b0fd497a14c4da35ca6922b58de3fa273d..3ccd3905fa0f07c58fe78ba559c9eb89294c0f8f 100644
(file)
--- a/
nss/getaddrinfo.c
+++ b/
nss/getaddrinfo.c
@@
-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)
{