diff options
author | Rajkumar Manoharan <rmanoharan@atheros.com> | 2010-07-07 05:49:18 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-07 15:39:07 -0400 |
commit | f8036965ccec4d786d8bf09bf57b793542cb3dce (patch) | |
tree | 9e919d26118e07433009438dbd29f69163ff9e59 /drivers | |
parent | e4c064728ca358622918fa69ab2bb05f5a2090a8 (diff) |
ath9k_htc: fix memory leak in ath9k_hif_usb_alloc_urbs
Failure cases within ath9k_hif_usb_alloc_urbs are failed
to release allocated memory.
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hif_usb.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 77b359162d6c..23c15aa9fbd5 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c | |||
@@ -730,13 +730,17 @@ static int ath9k_hif_usb_alloc_urbs(struct hif_device_usb *hif_dev) | |||
730 | 730 | ||
731 | /* RX */ | 731 | /* RX */ |
732 | if (ath9k_hif_usb_alloc_rx_urbs(hif_dev) < 0) | 732 | if (ath9k_hif_usb_alloc_rx_urbs(hif_dev) < 0) |
733 | goto err; | 733 | goto err_rx; |
734 | 734 | ||
735 | /* Register Read */ | 735 | /* Register Read */ |
736 | if (ath9k_hif_usb_alloc_reg_in_urb(hif_dev) < 0) | 736 | if (ath9k_hif_usb_alloc_reg_in_urb(hif_dev) < 0) |
737 | goto err; | 737 | goto err_reg; |
738 | 738 | ||
739 | return 0; | 739 | return 0; |
740 | err_reg: | ||
741 | ath9k_hif_usb_dealloc_rx_urbs(hif_dev); | ||
742 | err_rx: | ||
743 | ath9k_hif_usb_dealloc_tx_urbs(hif_dev); | ||
740 | err: | 744 | err: |
741 | return -ENOMEM; | 745 | return -ENOMEM; |
742 | } | 746 | } |