From: David Marchand Date: Mon, 17 Jun 2019 15:05:22 +0000 (+0200) Subject: net/nfb: avoid memory leak on unplug X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=281183d8519b84ad6c0322e40e230e718c4d26b6;p=dpdk.git net/nfb: avoid memory leak on unplug Clearing mac_addrs on remove will prevent ethdev from freeing it. Fixes: 6435f9a0ac22 ("net/nfb: add new netcope driver") Cc: stable@dpdk.org Signed-off-by: David Marchand Reviewed-by: Ferruh Yigit --- diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c index fdd0e701b9..6f77864249 100644 --- a/drivers/net/nfb/nfb_ethdev.c +++ b/drivers/net/nfb/nfb_ethdev.c @@ -510,8 +510,6 @@ nfb_eth_dev_uninit(struct rte_eth_dev *dev) struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev); struct rte_pci_addr *pci_addr = &pci_dev->addr; - dev->data->mac_addrs = NULL; - nfb_nc_rxmac_deinit(internals->rxmac, internals->max_rxmac); nfb_nc_txmac_deinit(internals->txmac, internals->max_txmac);