Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2018 22:19:34 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338161 - head/sys/dev/cxgbe/tom
Message-ID:  <201808212219.w7LMJYk9005272@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Tue Aug 21 22:19:34 2018
New Revision: 338161
URL: https://svnweb.freebsd.org/changeset/base/338161

Log:
  cxgbe/tom: Make sure 'matched' is always initialized before use.
  
  Reported by:	Coverity (CID 1390894)
  MFC after:	1 week
  Sponsored by:	Chelsio Communications

Modified:
  head/sys/dev/cxgbe/tom/t4_tom.c

Modified: head/sys/dev/cxgbe/tom/t4_tom.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_tom.c	Tue Aug 21 22:15:57 2018	(r338160)
+++ head/sys/dev/cxgbe/tom/t4_tom.c	Tue Aug 21 22:19:34 2018	(r338161)
@@ -1269,6 +1269,7 @@ lookup_offload_policy(struct adapter *sc, int open_typ
 	if (pkt == NULL || pktlen == 0 || buflen == 0)
 		return (&disallow_offloading_settings);
 
+	matched = 0;
 	r = &op->rule[0];
 	for (i = 0; i < op->nrules; i++, r++) {
 		if (r->open_type != open_type &&



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