From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 26984A0528; Thu, 9 Jul 2020 12:40:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 90BC71DC07; Thu, 9 Jul 2020 12:39:59 +0200 (CEST) Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by dpdk.org (Postfix) with ESMTP id 222761DB89; Thu, 9 Jul 2020 12:39:58 +0200 (CEST) Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id AA466378C068CE24D292; Thu, 9 Jul 2020 18:39:56 +0800 (CST) Received: from localhost (10.174.185.168) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Thu, 9 Jul 2020 18:39:47 +0800 From: wangyunjian To: CC: , , , , Yunjian Wang , Date: Thu, 9 Jul 2020 18:39:21 +0800 Message-ID: X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.185.168] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 1/1] bus/fslmc: fix memory leak in secondary process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" From: Yunjian Wang 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 --- 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