net/nfb: avoid memory leak on unplug
authorDavid Marchand <david.marchand@redhat.com>
Mon, 17 Jun 2019 15:05:22 +0000 (17:05 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 28 Jun 2019 18:31:49 +0000 (20:31 +0200)
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>
drivers/net/nfb/nfb_ethdev.c

index fdd0e70..6f77864 100644 (file)
@@ -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);