From 144dc4739975602eec9f8c5f33d1a1bb7df7fcdb Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Thu, 22 Apr 2021 10:05:02 +0800 Subject: [PATCH] net/bonding: fix leak on remove 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 2e9cea5b8e..25b1f771a1 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; -- 2.20.1