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>
Tue, 22 Mar 2022 14:09:46 +0000 (19:39 +0530)
commitb587456c0e7b59dcfdbd2d44db000a3bc8244e57
tree6b52cce5d1f03b71b349270206c5aa3a85a8097a
parentac4653ef503d1e87893d1a6714748a1cdf4bf7ad
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>
sysdeps/posix/getaddrinfo.c