diff options
author | Jesper Juhl <jj@chaosbits.net> | 2012-12-26 21:51:12 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-02 20:38:29 +0100 |
commit | 1474a89838c44ef2c9b95401cf3a9ff5ad05d5fd (patch) | |
tree | 6539c0df300ee24e7f2f324955a1384660a6deda | |
parent | ath9k_hw: Fix RX gain initvals for AR9485 (diff) | |
download | linux-1474a89838c44ef2c9b95401cf3a9ff5ad05d5fd.tar.xz linux-1474a89838c44ef2c9b95401cf3a9ff5ad05d5fd.zip |
rtlwifi: Don't leak on error in _rtl_usb_receive()
We fail to release 'urb' if '_rtl_prep_rx_urb()' fails in
_rtl_usb_receive().
This patch should take care of the leak.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rtlwifi/usb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c index a3312b7c4907..f2ecdeb3a90d 100644 --- a/drivers/net/wireless/rtlwifi/usb.c +++ b/drivers/net/wireless/rtlwifi/usb.c @@ -639,6 +639,7 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw) RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, "Failed to prep_rx_urb!!\n"); err = PTR_ERR(skb); + usb_free_urb(urb); goto err_out; } |