Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Dec 2017 16:45:26 +0000 (UTC)
From:      Alexander Kabaev <kan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r327112 - head/sys/netinet6
Message-ID:  <201712231645.vBNGjQf5064141@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kan
Date: Sat Dec 23 16:45:26 2017
New Revision: 327112
URL: https://svnweb.freebsd.org/changeset/base/327112

Log:
  Silence clang analyzer false positive.
  
  clang does not know that two lookup calls will return the same
  pointer, so it assumes correctly that using the old pointer
  after dropping the reference to it is a bit risky.

Modified:
  head/sys/netinet6/nd6_nbr.c

Modified: head/sys/netinet6/nd6_nbr.c
==============================================================================
--- head/sys/netinet6/nd6_nbr.c	Sat Dec 23 16:45:24 2017	(r327111)
+++ head/sys/netinet6/nd6_nbr.c	Sat Dec 23 16:45:26 2017	(r327112)
@@ -1307,7 +1307,8 @@ nd6_dad_stop(struct ifaddr *ifa)
 	 * we were waiting for it to stop, so re-do the lookup.
 	 */
 	nd6_dad_rele(dp);
-	if (nd6_dad_find(ifa, NULL) == NULL)
+	dp = nd6_dad_find(ifa, NULL);
+	if (dp == NULL)
 		return;
 
 	nd6_dad_del(dp);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712231645.vBNGjQf5064141>