aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet6/nd6_nbr.c
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2017-12-23 16:45:26 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2017-12-23 16:45:26 +0000
commitbf51c9665d3e8890166e77b29acd06841cc2baae (patch)
treefb13b9c3045e33a1bb7a72ee7fef296b0abf5dd0 /sys/netinet6/nd6_nbr.c
parent92f19df431e2135b6750f26aa7a4523119e3cf89 (diff)
downloadsrc-bf51c9665d3e8890166e77b29acd06841cc2baae.tar.gz
src-bf51c9665d3e8890166e77b29acd06841cc2baae.zip
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.
Notes
Notes: svn path=/head/; revision=327112
Diffstat (limited to 'sys/netinet6/nd6_nbr.c')
-rw-r--r--sys/netinet6/nd6_nbr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index 0ac90638aa3b..6766e1b80004 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -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);