Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Dec 2018 15:14:41 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r341426 - stable/12/sys/dev/cxgbe/cxgbei
Message-ID:  <201812031514.wB3FEfmb030582@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Mon Dec  3 15:14:40 2018
New Revision: 341426
URL: https://svnweb.freebsd.org/changeset/base/341426

Log:
  MFC r341001:
  Check for an allocation failure before dereferencing the pointer.

Modified:
  stable/12/sys/dev/cxgbe/cxgbei/cxgbei.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/cxgbe/cxgbei/cxgbei.c
==============================================================================
--- stable/12/sys/dev/cxgbe/cxgbei/cxgbei.c	Mon Dec  3 13:15:54 2018	(r341425)
+++ stable/12/sys/dev/cxgbe/cxgbei/cxgbei.c	Mon Dec  3 15:14:40 2018	(r341426)
@@ -449,9 +449,9 @@ do_rx_iscsi_ddp(struct sge_iq *iq, const struct rss_he
 			struct icl_pdu *ip0;
 
 			ip0 = icl_cxgbei_new_pdu(M_NOWAIT);
-			icl_cxgbei_new_pdu_set_conn(ip0, ic);
 			if (ip0 == NULL)
 				CXGBE_UNIMPLEMENTED("PDU allocation failure");
+			icl_cxgbei_new_pdu_set_conn(ip0, ic);
 			icp0 = ip_to_icp(ip0);
 			icp0->icp_seq = 0; /* XXX */
 			icp0->icp_flags = ICPF_RX_HDR | ICPF_RX_STATUS;



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