summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Marchand <david.marchand@redhat.com>2019-06-17 17:05:22 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2019-06-28 20:31:49 +0200
commit281183d8519b84ad6c0322e40e230e718c4d26b6 (patch)
treee1f113edbb309112a64760a38b1a574ee6e65965
parent15fb42d511ff56bdaedaa6d87dcf5240b404e6b5 (diff)
downloaddpdk-281183d8519b84ad6c0322e40e230e718c4d26b6.zip
dpdk-281183d8519b84ad6c0322e40e230e718c4d26b6.tar.gz
dpdk-281183d8519b84ad6c0322e40e230e718c4d26b6.tar.xz
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 <david.marchand@redhat.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
-rw-r--r--drivers/net/nfb/nfb_ethdev.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c
index fdd0e70..6f77864 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);