From: Yunjian Wang <wangyunj...@huawei.com> It does not correctly set the mac_addrs variable to NULL after freeing it, which will lead to a double free.
Fixes: 67fc3ff97c39 ("net/pfe: introduce basic functions") Cc: sta...@dpdk.org Signed-off-by: Yunjian Wang <wangyunj...@huawei.com> --- drivers/net/pfe/pfe_ethdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c index 940347819..ba0f8dd3f 100644 --- a/drivers/net/pfe/pfe_ethdev.c +++ b/drivers/net/pfe/pfe_ethdev.c @@ -397,6 +397,7 @@ pfe_eth_exit(struct rte_eth_dev *dev, struct pfe *pfe) pfe_eth_close_cdev(dev->data->dev_private); rte_free(dev->data->mac_addrs); + dev->data->mac_addrs = NULL; rte_eth_dev_release_port(dev); pfe->nb_devs--; } -- 2.19.1