patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [dpdk-dev] [PATCH 1/1] bus/fslmc: fix memory leak in secondary process
@ 2020-07-09 10:39 wangyunjian
  2020-07-09 15:15 ` Hemant Agrawal
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: wangyunjian @ 2020-07-09 10:39 UTC (permalink / raw)
  To: dev
  Cc: hemant.agrawal, sachin.saxena, jerry.lilijun, xudingke,
	Yunjian Wang, stable

From: Yunjian Wang <wangyunjian@huawei.com>

In fslmc_process_mcp(), we allocate memory for 'dev_name' but not released
before return in secondary process.

Coverity issue: 268327
Fixes: e55d0494ab98 ("bus/fslmc: support secondary process")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 drivers/bus/fslmc/fslmc_vfio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index efe2c43d3..247a265c0 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -772,6 +772,7 @@ fslmc_process_mcp(struct rte_dpaa2_device *dev)
 	 */
 	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
 		rte_mcp_ptr_list[MC_PORTAL_INDEX] = (void *)v_addr;
+		free(dev_name);
 		return 0;
 	}
 
-- 
2.23.0



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-07-21 18:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 10:39 [dpdk-stable] [dpdk-dev] [PATCH 1/1] bus/fslmc: fix memory leak in secondary process wangyunjian
2020-07-09 15:15 ` Hemant Agrawal
2020-07-17  9:20 ` David Marchand
2020-07-17  9:36   ` wangyunjian
2020-07-17 10:50 ` [dpdk-stable] [dpdk-dev] [PATCH v2] " wangyunjian
2020-07-20  5:28   ` Hemant Agrawal (OSS)
2020-07-21 18:52   ` David Marchand

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git