From owner-svn-src-all@FreeBSD.ORG Tue Dec 16 02:05:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73B8C1065670; Tue, 16 Dec 2008 02:05:12 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F9568FC13; Tue, 16 Dec 2008 02:05:12 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBG25CjQ023245; Tue, 16 Dec 2008 02:05:12 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBG25CXT023244; Tue, 16 Dec 2008 02:05:12 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812160205.mBG25CXT023244@svn.freebsd.org> From: Kip Macy Date: Tue, 16 Dec 2008 02:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186156 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2008 02:05:12 -0000 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);