Be consistent in checking ifa->ifa_addr for NULL.

Found by:	Coverity Prevent (tm)
MFC after:	3 days
This commit is contained in:
Yaroslav Tykhiy 2006-01-23 10:30:34 +00:00
parent 205aefa363
commit 83ec464f61

View File

@ -568,7 +568,7 @@ if_purgeaddrs(struct ifnet *ifp)
TAILQ_FOREACH_SAFE(ifa, &ifp->if_addrhead, ifa_link, next) {
if (ifa->ifa_addr->sa_family == AF_LINK)
if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_LINK)
continue;
#ifdef INET
/* XXX: Ugly!! ad hoc just for INET */