diff mbox

[-next,2/2] ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs()

Message ID 20100514145237.GF17487@bicker (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Dan Carpenter May 14, 2010, 2:52 p.m. UTC
None
diff mbox

Patch

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;
 }