[dpdk-stable] [dpdk-dev] [PATCH 1/1] bus/fslmc: fix memory leak in secondary process
wangyunjian
wangyunjian at huawei.com
Thu Jul 9 12:39:21 CEST 2020
From: Yunjian Wang <wangyunjian at 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 at dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian at 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
More information about the stable
mailing list