diff options
-rw-r--r-- | src/cmd/upas/common/libsys.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/upas/common/libsys.c b/src/cmd/upas/common/libsys.c index 8e55fc4d..b439cfde 100644 --- a/src/cmd/upas/common/libsys.c +++ b/src/cmd/upas/common/libsys.c @@ -465,6 +465,9 @@ sysnames_read(void) return namev; h = gethostbyname(alt_sysname_read()); + if(h == nil) + return 0; + for(p=h->h_aliases; *p; p++) ; @@ -491,7 +494,7 @@ domainname_read(void) char **namev, *p; Ndbtuple *t; - for(namev = sysnames_read(); *namev; namev++){ + for(namev = sysnames_read(); namev && *namev; namev++){ if(strchr(*namev, '.')){ for(p=*namev-1; p && *++p; p=strchr(p, '.')){ if((t = dnsquery(nil, p, "mx")) != nil){ |