aboutsummaryrefslogtreecommitdiff
path: root/sunrpc/clnt_simp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc/clnt_simp.c')
-rw-r--r--sunrpc/clnt_simp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sunrpc/clnt_simp.c b/sunrpc/clnt_simp.c
index 41d106e..e1e7e2a 100644
--- a/sunrpc/clnt_simp.c
+++ b/sunrpc/clnt_simp.c
@@ -105,7 +105,8 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum,
buflen = 1024;
buffer = __alloca (buflen);
while (__gethostbyname_r (host, &hostbuf, buffer, buflen,
- &hp, &herr) != 0)
+ &hp, &herr) != 0
+ || hp == NULL)
if (herr != NETDB_INTERNAL || errno != ERANGE)
return (int) RPC_UNKNOWNHOST;
else