summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-05-14 16:52:37 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-05-24 15:07:42 -0400
commit7606688afc767c0b94bb2d79512affe3ba1264ce (patch)
treeb7b90b53d3a525cf1abe59eaee4942f344b896e0 /drivers/net
parent690e781c5a3241d2366a3120ca410162da9c365e (diff)
downloadblackbird-op-linux-7606688afc767c0b94bb2d79512affe3ba1264ce.tar.gz
blackbird-op-linux-7606688afc767c0b94bb2d79512affe3ba1264ce.zip
ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs()
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> Acked-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/hif_usb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index ac82911ee609..77b359162d6c 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -609,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;
}
OpenPOWER on IntegriCloud