Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jan 2019 01:45:35 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343240 - head/sys/dev/iwm
Message-ID:  <201901210145.x0L1jZww084109@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Mon Jan 21 01:45:35 2019
New Revision: 343240
URL: https://svnweb.freebsd.org/changeset/base/343240

Log:
  iwm(4): Fix possible null pointer indirection
  
  Obtained from:	DragonFlyBSD (obtained from Haiku)
  MFC after:	1 week

Modified:
  head/sys/dev/iwm/if_iwm.c

Modified: head/sys/dev/iwm/if_iwm.c
==============================================================================
--- head/sys/dev/iwm/if_iwm.c	Mon Jan 21 01:03:03 2019	(r343239)
+++ head/sys/dev/iwm/if_iwm.c	Mon Jan 21 01:45:35 2019	(r343240)
@@ -1033,7 +1033,8 @@ iwm_reset_rx_ring(struct iwm_softc *sc, struct iwm_rx_
 	 * The hw rx ring index in shared memory must also be cleared,
 	 * otherwise the discrepancy can cause reprocessing chaos.
 	 */
-	memset(sc->rxq.stat, 0, sizeof(*sc->rxq.stat));
+	if (sc->rxq.stat)
+		memset(sc->rxq.stat, 0, sizeof(*sc->rxq.stat));
 }
 
 static void



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