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 14:38:29 -0500 |
commit | 1474a89838c44ef2c9b95401cf3a9ff5ad05d5fd (patch) | |
tree | 6539c0df300ee24e7f2f324955a1384660a6deda /drivers/net/wireless | |
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')
-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 a3312b7c490..f2ecdeb3a90 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; } |