Date: Tue, 16 Dec 2008 02:05:12 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r186156 - head/sys/netinet6 Message-ID: <200812160205.mBG25CXT023244@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kmacy Date: Tue Dec 16 02:05:11 2008 New Revision: 186156 URL: http://svn.freebsd.org/changeset/base/186156 Log: need to check that lle is not null before unlock if the break condition is not met also fix the break condition to explicitly check against NULL Modified: head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Tue Dec 16 01:58:30 2008 (r186155) +++ head/sys/netinet6/nd6_rtr.c Tue Dec 16 02:05:11 2008 (r186156) @@ -1333,13 +1333,14 @@ find_pfxlist_reachable_router(struct nd_ for (pfxrtr = LIST_FIRST(&pr->ndpr_advrtrs); pfxrtr; pfxrtr = LIST_NEXT(pfxrtr, pfr_entry)) { IF_AFDATA_LOCK(pfxrtr->router->ifp); - if ((ln = nd6_lookup(&pfxrtr->router->rtaddr, 0, - pfxrtr->router->ifp)) && + if (((ln = nd6_lookup(&pfxrtr->router->rtaddr, 0, + pfxrtr->router->ifp)) != NULL) && ND6_IS_LLINFO_PROBREACH(ln)) { LLE_RUNLOCK(ln); break; /* found */ } - LLE_RUNLOCK(ln); + if (ln != NULL) + LLE_RUNLOCK(ln); IF_AFDATA_UNLOCK(pfxrtr->router->ifp); } return (pfxrtr);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812160205.mBG25CXT023244>