Be consistent in checking ifa->ifa_addr for NULL.
Found by: Coverity Prevent (tm) MFC after: 3 days
This commit is contained in:
parent
205aefa363
commit
83ec464f61
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user