Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Sep 2012 10:00:37 +0000 (UTC)
From:      Mikolaj Golub <trociny@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r239977 - stable/8/sys/netinet
Message-ID:  <201209011000.q81A0b1x087502@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trociny
Date: Sat Sep  1 10:00:37 2012
New Revision: 239977
URL: http://svn.freebsd.org/changeset/base/239977

Log:
  MFC r238084:
  
  Don't check for ifp != NULL before KASSERT, as ifp may not be NULL here
  (it is dereferenced below).
  
  Discussed with:	jhb

Modified:
  stable/8/sys/netinet/igmp.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/netinet/igmp.c
==============================================================================
--- stable/8/sys/netinet/igmp.c	Sat Sep  1 09:58:09 2012	(r239976)
+++ stable/8/sys/netinet/igmp.c	Sat Sep  1 10:00:37 2012	(r239977)
@@ -2284,13 +2284,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?201209011000.q81A0b1x087502>