* [PATCH] adm8211: fix memory leak
@ 2010-07-10 12:28 Kulikov Vasiliy
2010-07-12 14:51 ` Luis R. Rodriguez
0 siblings, 1 reply; 2+ messages in thread
From: Kulikov Vasiliy @ 2010-07-10 12:28 UTC (permalink / raw)
To: kernel-janitors-u79uwXL29TY76Z2rM5mHXA
Cc: Michael Wu, John W. Linville, David S. Miller, Johannes Berg,
Kalle Valo, Luis R. Rodriguez,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
We must free priv->eeprom allocated in adm8211_read_eeprom().
Signed-off-by: Kulikov Vasiliy <segooon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
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 880ad9d..bde2fa8 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 +
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] adm8211: fix memory leak
2010-07-10 12:28 [PATCH] adm8211: fix memory leak Kulikov Vasiliy
@ 2010-07-12 14:51 ` Luis R. Rodriguez
0 siblings, 0 replies; 2+ messages in thread
From: Luis R. Rodriguez @ 2010-07-12 14:51 UTC (permalink / raw)
To: Kulikov Vasiliy
Cc: kernel-janitors@vger.kernel.org, Michael Wu, John W. Linville,
David S. Miller, Johannes Berg, Kalle Valo, Luis Rodriguez,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org
On Sat, Jul 10, 2010 at 05:28:57AM -0700, Kulikov Vasiliy wrote:
> 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>
Good catch.
Luis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-12 14:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-10 12:28 [PATCH] adm8211: fix memory leak Kulikov Vasiliy
2010-07-12 14:51 ` Luis R. Rodriguez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).