summaryrefslogtreecommitdiff
path: root/sunrpc/get_myaddr.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-09-30 09:05:55 +0000
committerJakub Jelinek <jakub@redhat.com>2004-09-30 09:05:55 +0000
commit6a87697239310dd529781d9db1ee705eeaa5405e (patch)
treed89bd4ede05cf7918178e39da5950535725717d8 /sunrpc/get_myaddr.c
parentbd307f4e23f985b55276724a00f88e07309e68be (diff)
Updated to fedora-glibc-20040930T0838cvs/fedora-glibc-2_3_3-61
Diffstat (limited to 'sunrpc/get_myaddr.c')
-rw-r--r--sunrpc/get_myaddr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sunrpc/get_myaddr.c b/sunrpc/get_myaddr.c
index c0beee9c59..4449c53c06 100644
--- a/sunrpc/get_myaddr.c
+++ b/sunrpc/get_myaddr.c
@@ -76,7 +76,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 == 1 && (run->ifa_flags & IFF_LOOPBACK))))
{