From patchwork Thu Apr 22 02:05:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "humin (Q)" X-Patchwork-Id: 91986 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8DDBEA0547; Thu, 22 Apr 2021 04:05:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 531B041C11; Thu, 22 Apr 2021 04:05:00 +0200 (CEST) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id DBF7341C08 for ; Thu, 22 Apr 2021 04:04:58 +0200 (CEST) Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FQgff38JnztX0t for ; Thu, 22 Apr 2021 10:02:34 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Thu, 22 Apr 2021 10:04:48 +0800 From: "Min Hu (Connor)" To: CC: , Date: Thu, 22 Apr 2021 10:05:02 +0800 Message-ID: <1619057102-4154-1-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] net/bonding: fix kvlist memory leakage 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" From: Chengwen Feng If the bond device was created by vdev mode, the kvlist was not free when the bond device removed. Fixes: 8d30fe7fa737 ("bonding: support port hotplug") Cc: stable@dpdk.org Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) Reviewed-by: Ferruh Yigit --- drivers/net/bonding/rte_eth_bond_pmd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 2e9cea5..25b1f77 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3467,6 +3467,8 @@ bond_remove(struct rte_vdev_device *dev) ret = bond_ethdev_stop(eth_dev); bond_ethdev_close(eth_dev); } + if (internals->kvlist != NULL) + rte_kvargs_free(internals->kvlist); rte_eth_dev_release_port(eth_dev); return ret;