The MAC addresses array is already freed by rte_eth_dev_release_port(). The redundant freeing can be removed from the PMD port closing functions.
Signed-off-by: Thomas Monjalon <tho...@monjalon.net> --- drivers/net/ark/ark_ethdev.c | 3 --- drivers/net/hinic/hinic_pmd_ethdev.c | 3 --- drivers/net/ice/ice_ethdev.c | 3 --- drivers/net/nfb/nfb_ethdev.c | 3 --- drivers/net/szedata2/rte_eth_szedata2.c | 3 --- 5 files changed, 15 deletions(-) diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index 8012af75ee..641a694717 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -707,9 +707,6 @@ eth_ark_dev_close(struct rte_eth_dev *dev) dev->data->rx_queues[i] = 0; } - rte_free(dev->data->mac_addrs); - dev->data->mac_addrs = 0; - return 0; } diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c index 623534fda4..460093bf95 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.c +++ b/drivers/net/hinic/hinic_pmd_ethdev.c @@ -3225,9 +3225,6 @@ static int hinic_dev_uninit(struct rte_eth_dev *dev) rte_free(nic_dev->mc_list); - rte_free(dev->data->mac_addrs); - dev->data->mac_addrs = NULL; - return HINIC_OK; } diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index f0cb05cbc9..1a7896f0da 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2423,9 +2423,6 @@ ice_dev_close(struct rte_eth_dev *dev) dev->rx_pkt_burst = NULL; dev->tx_pkt_burst = NULL; - rte_free(dev->data->mac_addrs); - dev->data->mac_addrs = NULL; - /* disable uio intr before callback unregister */ rte_intr_disable(intr_handle); diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c index d937ac6922..6fe7500475 100644 --- a/drivers/net/nfb/nfb_ethdev.c +++ b/drivers/net/nfb/nfb_ethdev.c @@ -233,9 +233,6 @@ nfb_eth_dev_close(struct rte_eth_dev *dev) } dev->data->nb_tx_queues = 0; - rte_free(dev->data->mac_addrs); - dev->data->mac_addrs = NULL; - return 0; } diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c index 5f589dfa4c..9ae653e1bd 100644 --- a/drivers/net/szedata2/rte_eth_szedata2.c +++ b/drivers/net/szedata2/rte_eth_szedata2.c @@ -1178,9 +1178,6 @@ eth_dev_close(struct rte_eth_dev *dev) } dev->data->nb_tx_queues = 0; - rte_free(dev->data->mac_addrs); - dev->data->mac_addrs = NULL; - return 0; } -- 2.28.0