]> git.ipfire.org Git - thirdparty/glibc.git/commit
gethosts: Return EAI_MEMORY on allocation failure
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 2 Mar 2022 06:15:29 +0000 (11:45 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Fri, 15 Sep 2023 22:32:39 +0000 (18:32 -0400)
commit1b9087dcec81e2fd5d7c59ae66d04bd2f0bb64ad
tree8e8a197619f803a07f5699e9c7e5737e2b3e6996
parentf5f88f142ae67d45388fd669947ec23e0af8ea37
gethosts: Return EAI_MEMORY on allocation failure

All other cases of failures due to lack of memory return EAI_MEMORY, so
it seems wrong to return EAI_SYSTEM here.  The only reason
convert_hostent_to_gaih_addrtuple could fail is on calloc failure.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: DJ Delorie <dj@redhat.com>
(cherry picked from commit b587456c0e7b59dcfdbd2d44db000a3bc8244e57)
sysdeps/posix/getaddrinfo.c