Skip to content

Commit

Permalink
net/bonding: fix leak on remove
Browse files Browse the repository at this point in the history
[ upstream commit 144dc47 ]

If the bond device was created by vdev mode, the kvlist was not free
when the bond device removed.

Fixes: 8d30fe7 ("bonding: support port hotplug")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  • Loading branch information
fengchengwen authored and steevenlee committed Jun 8, 2021
1 parent 8abec7f commit 448c880
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/bonding/rte_eth_bond_pmd.c
Expand Up @@ -3459,6 +3459,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;
Expand Down

0 comments on commit 448c880

Please sign in to comment.