From 423700997b2aadfe295d6914ea9ea8b9c5cdc805 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Mon, 26 Nov 2018 22:42:52 +0000 Subject: [PATCH] Check for an allocation failure before dereferencing the pointer. Reported by: Ilja Van Sprundel Reviewed by: np MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18310 --- sys/dev/cxgbe/cxgbei/cxgbei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/cxgbei/cxgbei.c b/sys/dev/cxgbe/cxgbei/cxgbei.c index 0a4f4ab304c..17a16fb5199 100644 --- a/sys/dev/cxgbe/cxgbei/cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/cxgbei.c @@ -449,9 +449,9 @@ do_rx_iscsi_ddp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) 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;