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 D70DCA034E; Tue, 22 Feb 2022 19:19:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7CF04116D; Tue, 22 Feb 2022 19:18:56 +0100 (CET) Received: from out203-205-221-221.mail.qq.com (out203-205-221-221.mail.qq.com [203.205.221.221]) by mails.dpdk.org (Postfix) with ESMTP id 58E104117A for ; Tue, 22 Feb 2022 19:18:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1645553933; bh=HqIdzOC66tf+SUSFZ/B8pOEf1e68XxRDR13BoXlTK/c=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ef0GWyNcsxyHgr3mjZEpGR5vDLk/qVhIZygcn4SbipExkuV7ve0GHZ0lfhzc22iZ/ EQr9Qjxt7zKayWJGKENwovcr5vDGfEACngx5u7Di4a+yHWl3Tp4fOjcyMcVfpDPdU3 hfDunZkRmEPRmPtSUYZkcIBRCeyHzLkDPOgz0emY= Received: from localhost.localdomain ([111.193.130.237]) by newxmesmtplogicsvrszc6.qq.com (NewEsmtp) with SMTP id 49223207; Wed, 23 Feb 2022 02:18:18 +0800 X-QQ-mid: xmsmtpt1645553929tvlqfg5k0 Message-ID: X-QQ-XMAILINFO: MJp4BpBFe1fJUT2+UQHG+XRlUNxL5Zljge7NTEP1a/EZOqsKmBVVfbHegP1bJE EHMhU92FlkcQmhDHx8u5mW40kGdvRPs1PaTafREn7IauYXkGLJBdSojXR4urBHOBC8G1LpidHa+b lTuYqFDwXP0UdMqx+DYC92e22K2+fHYGCH+wMQr+Rq/nZZSNZ3dLTH0tInb/gQe8aleR1s8OjS04 D+Gd4qnZAr7J7cv1J0om6cgsv7rxoBlyNssu8nT0ba2s7NSHpYqxo9cS0Eo2YgpZWU1/HC4OXaOp okVkywqFXYAU2+EJ7qIa4qR56ksxla3b/Y4LUXLjvSzIS+mB/cTFSRkMJaOPXka3+qNFQqPkoeqh Va5ybSx9TyaJElwjWcf+T9aOy4CeMRR/W14fjx/Azj57YXcpDWBkk5OF9qlARy1IAw5L9LdQL98I NQLVz8rSdWPHJyfNHjVV0TH5CXI32BcHcqPuzGFUXyH89rgR/4oJxiWXTEjGwFqV7xh39B6/seUJ mR5tQ0Dv8ZyGlzeusEbvXWjK6aFf/VztAUHEm2gnLHxy03oZ2z8ynpxkUyuwKGepoHMwkPh7nmbW zK6zAv6FSLM+/Z3FFd/zC4KVQWjZvaTYHPaSIryGLxOrTfJMku5kT3JHXkcYmcjWOWPV7ON3aO4b vl90RDnKfZxjxRgXBAN/cem3RTjCA6HP7ItVCwjlhIzfcs3YLwBrTSkRB4y5jBU5tT/tTBk77BKl OoQIQT5RiZJSJEzCTDzjTvsREmFxJNiq/KJ3m8grUAypKdER0RNwvWNuCCjJrjFWQxegdlVND5Sb eT3Uat/Bkq3kW9jX1lGBvZZaC5XshKvrCNkPVLVPQvozq15rDrepIXFr4ti0A0Lku6u2SE9o04RA oL185UHd1Jo5i/xKoh/r7gMLZkHN4oaQ== From: Weiguo Li To: dev@dpdk.org Cc: adypodoman@gmail.com, xiaoyun.li@intel.com, tianfei.zhang@intel.com, bruce.richardson@intel.com, ivan.malov@oktetlabs.ru, jgrajcia@cisco.com, hkalra@marvell.com, ying.a.wang@intel.com, ting.xu@intel.com, simei.su@intel.com, qiming.yang@intel.com, motih@mellanox.com, shreyansh.jain@nxp.com, skoteshwar@marvell.com, stephen@networkplumber.org, kalesh-anakkur.purayil@broadcom.com, somnath.kotur@broadcom.com, declan.doherty@intel.com, gakhil@marvell.com, nicolas.chautru@intel.com Subject: [PATCH 07/20] net/bnx2x: add clean up for 'rxq' to avoid a memory leak Date: Wed, 23 Feb 2022 02:18:05 +0800 X-OQ-MSGID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 This error handling miss a clean up for 'rxq' which leads to a memory leak. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Weiguo Li --- drivers/net/bnx2x/bnx2x_rxtx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c index fbc0bb7698..9ad36000fb 100644 --- a/drivers/net/bnx2x/bnx2x_rxtx.c +++ b/drivers/net/bnx2x/bnx2x_rxtx.c @@ -139,6 +139,7 @@ bnx2x_dev_rx_queue_setup(struct rte_eth_dev *dev, dma = ring_dma_zone_reserve(dev, "bnx2x_rcq", queue_idx, dma_size, socket_id); if (NULL == dma) { PMD_RX_LOG(ERR, "RCQ alloc failed"); + bnx2x_rx_queue_release(rxq); return -ENOMEM; } fp->rx_comp_mapping = rxq->cq_ring_phys_addr = (uint64_t)dma->iova; -- 2.25.1