Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jul 2012 19:04:19 +0000 (UTC)
From:      Mikolaj Golub <trociny@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r238084 - head/sys/netinet
Message-ID:  <201207031904.q63J4JnR065216@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trociny
Date: Tue Jul  3 19:04:18 2012
New Revision: 238084
URL: http://svn.freebsd.org/changeset/base/238084

Log:
  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

Modified:
  head/sys/netinet/igmp.c

Modified: head/sys/netinet/igmp.c
==============================================================================
--- head/sys/netinet/igmp.c	Tue Jul  3 18:59:13 2012	(r238083)
+++ head/sys/netinet/igmp.c	Tue Jul  3 19:04:18 2012	(r238084)
@@ -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();
 



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