summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2012-12-26 21:51:12 +0100
committerJohn W. Linville <linville@tuxdriver.com>2013-01-02 14:38:29 -0500
commit1474a89838c44ef2c9b95401cf3a9ff5ad05d5fd (patch)
tree6539c0df300ee24e7f2f324955a1384660a6deda /drivers/net
parenta796a1dd5da9645ad77aa687d1a890ecd63ab5a6 (diff)
downloadop-kernel-dev-1474a89838c44ef2c9b95401cf3a9ff5ad05d5fd.zip
op-kernel-dev-1474a89838c44ef2c9b95401cf3a9ff5ad05d5fd.tar.gz
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')
-rw-r--r--drivers/net/wireless/rtlwifi/usb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index a3312b7..f2ecdeb 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;
}
OpenPOWER on IntegriCloud