diff options
author | Arjun Vynipadath <arjun@chelsio.com> | 2018-11-09 12:22:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-10 02:18:48 +0300 |
commit | 40c4b1e9b6ca39c9b0b40b69cf3fb71e01c5d490 (patch) | |
tree | 0fda55bd258f787db889fd862e2e5e8617a254d5 /drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | |
parent | 24357e06ba511ad874d664d39475dbb01c1ca450 (diff) | |
download | linux-40c4b1e9b6ca39c9b0b40b69cf3fb71e01c5d490.tar.xz |
cxgb4vf: free mac_hlist properly
The locally maintained list for tracking hash mac table was
not freed during driver remove.
Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c index 972dc7bd721d..8ec503c88c06 100644 --- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c @@ -3289,6 +3289,7 @@ err_disable_device: static void cxgb4vf_pci_remove(struct pci_dev *pdev) { struct adapter *adapter = pci_get_drvdata(pdev); + struct hash_mac_addr *entry, *tmp; /* * Tear down driver state associated with device. @@ -3339,6 +3340,11 @@ static void cxgb4vf_pci_remove(struct pci_dev *pdev) if (!is_t4(adapter->params.chip)) iounmap(adapter->bar2); kfree(adapter->mbox_log); + list_for_each_entry_safe(entry, tmp, &adapter->mac_hlist, + list) { + list_del(&entry->list); + kfree(entry); + } kfree(adapter); } |