Skip to contentSkip to conversation

net/bonding: fix kvlist memory leakage

PATCH Applied Min Hu (Connor) 2 participants 2 messages Apr 22, 2021 – Apr 26, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bonding: fix kvlist memory leakage

From: Chengwen Feng <[email protected]>

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")
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/bonding/rte_eth_bond_pmd.c +2 -0
index 2e9cea5..25b1f77 100644
@@ -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;
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1 Applied
#1 lore raw
Quoted 10 lines · Min Hu (Connor)

From: Chengwen Feng <[email protected]>

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")

Applied to dpdk-next-net/main, thanks.