diff options
author | Lior Dotan <liodot@gmail.com> | 2008-10-12 02:43:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-22 12:56:37 -0400 |
commit | 786ed801ac9607a98fdeb8230ea05202a41fc1c7 (patch) | |
tree | 11b15f596c27f36bdc5409ecea4d7f87326eebd9 /drivers/staging | |
parent | 9b2126db35bd7546c5998a06dcbac96c6ec21e4f (diff) |
Staging: SLICOSS: Free multicast list at driver exit
The multicast address list is allocated in slic_mcast_add_list() but
never freed.
Signed-off-by: Lior Dotan <liodot@gmail.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/slicoss/slicoss.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 6ef9274a1a6..8fa9490b3e2 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c | |||
@@ -596,6 +596,7 @@ static void __devexit slic_entry_remove(struct pci_dev *pcidev) | |||
596 | uint mmio_len = 0; | 596 | uint mmio_len = 0; |
597 | struct adapter *adapter = (struct adapter *) netdev_priv(dev); | 597 | struct adapter *adapter = (struct adapter *) netdev_priv(dev); |
598 | struct sliccard *card; | 598 | struct sliccard *card; |
599 | struct mcast_address *mcaddr, *mlist; | ||
599 | 600 | ||
600 | ASSERT(adapter); | 601 | ASSERT(adapter); |
601 | DBG_MSG("slicoss: %s ENTER dev[%p] adapter[%p]\n", __func__, dev, | 602 | DBG_MSG("slicoss: %s ENTER dev[%p] adapter[%p]\n", __func__, dev, |
@@ -615,6 +616,13 @@ static void __devexit slic_entry_remove(struct pci_dev *pcidev) | |||
615 | DBG_MSG("slicoss: %s iounmap dev->base_addr[%x]\n", __func__, | 616 | DBG_MSG("slicoss: %s iounmap dev->base_addr[%x]\n", __func__, |
616 | (uint) dev->base_addr); | 617 | (uint) dev->base_addr); |
617 | iounmap((void __iomem *)dev->base_addr); | 618 | iounmap((void __iomem *)dev->base_addr); |
619 | /* free multicast addresses */ | ||
620 | mlist = adapter->mcastaddrs; | ||
621 | while (mlist) { | ||
622 | mcaddr = mlist; | ||
623 | mlist = mlist->next; | ||
624 | kfree(mcaddr); | ||
625 | } | ||
618 | ASSERT(adapter->card); | 626 | ASSERT(adapter->card); |
619 | card = adapter->card; | 627 | card = adapter->card; |
620 | ASSERT(card->adapters_allocated); | 628 | ASSERT(card->adapters_allocated); |