summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/adm8211.c
diff options
context:
space:
mode:
authorKulikov Vasiliy <segooon@gmail.com>2010-07-10 14:28:57 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-07-12 22:05:32 +0200
commitb85aeb51805265b9f826857e5c5d9c0cd70dda55 (patch)
tree52a9d32f6266844186ebe0ca2488102f4ef9a6ae /drivers/net/wireless/adm8211.c
parentprism54: call BUG_ON() earlier (diff)
downloadlinux-b85aeb51805265b9f826857e5c5d9c0cd70dda55.tar.xz
linux-b85aeb51805265b9f826857e5c5d9c0cd70dda55.zip
adm8211: fix memory leak
We must free priv->eeprom allocated in adm8211_read_eeprom(). Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/adm8211.c')
-rw-r--r--drivers/net/wireless/adm8211.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index 880ad9d170c2..bde2fa8bb639 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1903,7 +1903,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
if (err) {
printk(KERN_ERR "%s (adm8211): Cannot register device\n",
pci_name(pdev));
- goto err_free_desc;
+ goto err_free_eeprom;
}
printk(KERN_INFO "%s: hwaddr %pM, Rev 0x%02x\n",
@@ -1912,6 +1912,9 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
return 0;
+ err_free_eeprom:
+ kfree(priv->eeprom);
+
err_free_desc:
pci_free_consistent(pdev,
sizeof(struct adm8211_desc) * priv->rx_ring_size +