summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ntpd/server.c')
-rw-r--r--usr.sbin/ntpd/server.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ntpd/server.c b/usr.sbin/ntpd/server.c
index 1e2d536d05f..27668c92406 100644
--- a/usr.sbin/ntpd/server.c
+++ b/usr.sbin/ntpd/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.21 2005/01/28 12:01:32 dtucker Exp $ */
+/* $OpenBSD: server.c,v 1.22 2005/05/24 20:10:50 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -44,8 +44,9 @@ setup_listeners(struct servent *se, struct ntpd_conf *conf, u_int *cnt)
for (ifap = ifa; ifap != NULL; ifap = ifap->ifa_next) {
sa = ifap->ifa_addr;
- if (sa->sa_family != AF_INET &&
- sa->sa_family != AF_INET6)
+ if (sa == NULL ||
+ (sa->sa_family != AF_INET &&
+ sa->sa_family != AF_INET6))
continue;
if ((la = calloc(1, sizeof(struct listen_addr))) ==