about summary refs log tree commit diff
path: root/sunrpc/pmap_clnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc/pmap_clnt.c')
-rw-r--r--sunrpc/pmap_clnt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sunrpc/pmap_clnt.c b/sunrpc/pmap_clnt.c
index aa5740c8a0..3e42960893 100644
--- a/sunrpc/pmap_clnt.c
+++ b/sunrpc/pmap_clnt.c
@@ -70,7 +70,9 @@ __get_myaddress (struct sockaddr_in *addr)
   run = ifa;
   while (run != NULL)
     {
-      if ((run->ifa_flags & IFF_UP) && run->ifa_addr->sa_family == AF_INET
+      if ((run->ifa_flags & IFF_UP)
+	  && run->ifa_addr != NULL
+	  && run->ifa_addr->sa_family == AF_INET
 	  && ((run->ifa_flags & IFF_LOOPBACK) || loopback == 0))
 	{
 	  *addr = *((struct sockaddr_in *) run->ifa_addr);