* [patch -next 2/2] ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs()
@ 2010-05-14 14:52 Dan Carpenter
2010-05-18 6:56 ` Sujith
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-05-14 14:52 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Jouni Malinen, Sujith Manoharan, Vasanthakumar Thiagarajan,
Senthil Balasubramanian, John W. Linville, Ming Lei,
linux-wireless, ath9k-devel
This is obviously a small picky thing. The original error handling code
doesn't free the most recent allocations which haven't been added to the
hif_dev->tx.tx_buf list yet.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 46dc41a..77b3591 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -607,6 +609,10 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev)
return 0;
err:
+ if (tx_buf) {
+ kfree(tx_buf->buf);
+ kfree(tx_buf);
+ }
ath9k_hif_usb_dealloc_tx_urbs(hif_dev);
return -ENOMEM;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [patch -next 2/2] ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs()
2010-05-14 14:52 [patch -next 2/2] ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs() Dan Carpenter
@ 2010-05-18 6:56 ` Sujith
0 siblings, 0 replies; 2+ messages in thread
From: Sujith @ 2010-05-18 6:56 UTC (permalink / raw)
To: Dan Carpenter
Cc: Luis Rodriguez, Jouni Malinen, Vasanth Thiagarajan,
Senthilkumar Balasubramanian, John W. Linville, Ming Lei,
linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org
Dan Carpenter wrote:
> This is obviously a small picky thing. The original error handling code
> doesn't free the most recent allocations which haven't been added to the
> hif_dev->tx.tx_buf list yet.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Thanks.
Acked-by: Sujith <Sujith.Manoharan@atheros.com>
> diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
> index 46dc41a..77b3591 100644
> --- a/drivers/net/wireless/ath/ath9k/hif_usb.c
> +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
> @@ -607,6 +609,10 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev)
>
> return 0;
> err:
> + if (tx_buf) {
> + kfree(tx_buf->buf);
> + kfree(tx_buf);
> + }
> ath9k_hif_usb_dealloc_tx_urbs(hif_dev);
> return -ENOMEM;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-18 6:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-14 14:52 [patch -next 2/2] ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs() Dan Carpenter
2010-05-18 6:56 ` Sujith
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).