From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D14BA0548; Mon, 1 Nov 2021 18:54:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F382140E28; Mon, 1 Nov 2021 18:54:32 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id A60C240DF6 for ; Mon, 1 Nov 2021 18:54:30 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1A1CKSAT001065; Mon, 1 Nov 2021 10:54:30 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=ruJEa8zQpBRI1BRwxMK8Sc8+byAuECcCSI5Y3vH0+x4=; b=Ls4hr5Kui14tawUSkhAErAv5TNgNE7X/3tVOdjaIpH5DkFqjOjDoFdS8spQ0mpbZjyQ1 7QdvVCt1L/cPyV5s0dQRYsfuJq0IB/SgGcntoDDnXY4QlR3fKF43fW7gGICKCEkEPJCJ wuOIjZaBr8PnpU2V15uCTN7Te89c2rXOPku1n7qmQD5hlyw1MYXgPPAi+2w2W78psCz/ 3qCw7/NLQj6s4FSj8Pg9OiZWkaZuFTnimDcyhf9tZArWoHcw3tyo7IZfxkhN61S9bkxl fopuLeBXCPks55/+BA3/ICF5ybhan4s57tFrwrVWa65yu6FnTF4mCVEM2d+bqnYOh1rV 3g== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3c25c4bsfj-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 01 Nov 2021 10:54:30 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 1 Nov 2021 10:54:28 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 1 Nov 2021 10:54:27 -0700 Received: from localhost.marvell.com (unknown [10.29.52.211]) by maili.marvell.com (Postfix) with ESMTP id DE4713F70B3; Mon, 1 Nov 2021 10:54:25 -0700 (PDT) From: Harman Kalra To: , Matan Azrad , Viacheslav Ovsiienko CC: , , Harman Kalra Date: Mon, 1 Nov 2021 23:23:37 +0530 Message-ID: <20211101175337.83358-6-hkalra@marvell.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20211101175337.83358-1-hkalra@marvell.com> References: <20211101175337.83358-1-hkalra@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: -RMADZznQZsQDBYpuADkQs0SWIPhyU7q X-Proofpoint-GUID: -RMADZznQZsQDBYpuADkQs0SWIPhyU7q X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-01_06,2021-11-01_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH 6/6] net/mlx4: fix dereference after null check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch fixes coverity issue by adding a NULL check Coverity issue: 373687 Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle") Signed-off-by: Harman Kalra --- drivers/net/mlx4/mlx4.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index cccc71f757..3f3c4a7c72 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -1112,7 +1112,8 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) prev_dev = eth_dev; continue; port_error: - rte_intr_instance_free(priv->intr_handle); + if (priv != NULL) + rte_intr_instance_free(priv->intr_handle); rte_free(priv); if (eth_dev != NULL) eth_dev->data->dev_private = NULL; -- 2.18.0