diff options
author | trociny <trociny@FreeBSD.org> | 2012-07-03 19:04:18 +0000 |
---|---|---|
committer | trociny <trociny@FreeBSD.org> | 2012-07-03 19:04:18 +0000 |
commit | f1022aa1288820e3502fc7cd7eff1d971c8b266c (patch) | |
tree | 65bfba5482abb0d9db7eb2ac8ca4eb2519924d6c /sys/netinet/igmp.c | |
parent | ebe6542543029ab5577472e468b77dcbac032c4c (diff) | |
download | FreeBSD-src-f1022aa1288820e3502fc7cd7eff1d971c8b266c.zip FreeBSD-src-f1022aa1288820e3502fc7cd7eff1d971c8b266c.tar.gz |
Don't check for ifp != NULL before KASSERT, as ifp may not be NULL here
(it is dereferenced below).
Discussed with: jhb
MFC after: 1 week
Diffstat (limited to 'sys/netinet/igmp.c')
-rw-r--r-- | sys/netinet/igmp.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 4c0b105..94c00a1 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -2285,13 +2285,11 @@ igmp_change_state(struct in_multi *inm) */ KASSERT(inm->inm_ifma != NULL, ("%s: no ifma", __func__)); ifp = inm->inm_ifma->ifma_ifp; - if (ifp != NULL) { - /* - * Sanity check that netinet's notion of ifp is the - * same as net's. - */ - KASSERT(inm->inm_ifp == ifp, ("%s: bad ifp", __func__)); - } + /* + * Sanity check that netinet's notion of ifp is the + * same as net's. + */ + KASSERT(inm->inm_ifp == ifp, ("%s: bad ifp", __func__)); IGMP_LOCK(); |