diff options
author | Jesper Juhl <jj@chaosbits.net> | 2012-12-26 15:51:12 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-02 14:38:29 -0500 |
commit | 1474a89838c44ef2c9b95401cf3a9ff5ad05d5fd (patch) | |
tree | 6539c0df300ee24e7f2f324955a1384660a6deda /drivers/net/wireless/rtlwifi | |
parent | a796a1dd5da9645ad77aa687d1a890ecd63ab5a6 (diff) |
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>
Diffstat (limited to 'drivers/net/wireless/rtlwifi')
-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) | |||
639 | RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, | 639 | RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, |
640 | "Failed to prep_rx_urb!!\n"); | 640 | "Failed to prep_rx_urb!!\n"); |
641 | err = PTR_ERR(skb); | 641 | err = PTR_ERR(skb); |
642 | usb_free_urb(urb); | ||
642 | goto err_out; | 643 | goto err_out; |
643 | } | 644 | } |
644 | 645 | ||