diff options
author | Kulikov Vasiliy <segooon@gmail.com> | 2010-07-10 08:28:57 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-12 16:05:32 -0400 |
commit | b85aeb51805265b9f826857e5c5d9c0cd70dda55 (patch) | |
tree | 52a9d32f6266844186ebe0ca2488102f4ef9a6ae /drivers/net/wireless/adm8211.c | |
parent | 4c92831d99827971cf2854cfa7f884213099428f (diff) |
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.c | 5 |
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, | |||
1903 | if (err) { | 1903 | if (err) { |
1904 | printk(KERN_ERR "%s (adm8211): Cannot register device\n", | 1904 | printk(KERN_ERR "%s (adm8211): Cannot register device\n", |
1905 | pci_name(pdev)); | 1905 | pci_name(pdev)); |
1906 | goto err_free_desc; | 1906 | goto err_free_eeprom; |
1907 | } | 1907 | } |
1908 | 1908 | ||
1909 | printk(KERN_INFO "%s: hwaddr %pM, Rev 0x%02x\n", | 1909 | printk(KERN_INFO "%s: hwaddr %pM, Rev 0x%02x\n", |
@@ -1912,6 +1912,9 @@ static int __devinit adm8211_probe(struct pci_dev *pdev, | |||
1912 | 1912 | ||
1913 | return 0; | 1913 | return 0; |
1914 | 1914 | ||
1915 | err_free_eeprom: | ||
1916 | kfree(priv->eeprom); | ||
1917 | |||
1915 | err_free_desc: | 1918 | err_free_desc: |
1916 | pci_free_consistent(pdev, | 1919 | pci_free_consistent(pdev, |
1917 | sizeof(struct adm8211_desc) * priv->rx_ring_size + | 1920 | sizeof(struct adm8211_desc) * priv->rx_ring_size + |