roken: getaddrinfo get_null return errors
commit7b914bfb645a12057024966e79ddbb240b7cdca6
authorJeffrey Altman <jaltman@auristor.com>
Fri, 16 Sep 2022 17:48:55 +0000 (16 13:48 -0400)
committerJeffrey Altman <jaltman@auristor.com>
Fri, 16 Sep 2022 19:58:45 +0000 (16 15:58 -0400)
tree1132a020e25052c41dc231d21b50a283e8606121
parent76c110e1efe57e3634e09670b3a0d34853b0b05e
roken: getaddrinfo get_null return errors

get_null() can fail for two reasons.  There can be a memory allocation
issue or the hints->ai_family could be unsupported.  This change
informs the caller of the error state instead of returning success
with an invalid struct addrinfo output parameter.

Fixes #1007
Reported-by: opless
lib/roken/getaddrinfo.c