]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
rtlwifi: Don't leak on error in _rtl_usb_receive()
authorJesper Juhl <jj@chaosbits.net>
Wed, 26 Dec 2012 20:51:12 +0000 (21:51 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 2 Jan 2013 19:38:29 +0000 (14:38 -0500)
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>
drivers/net/wireless/rtlwifi/usb.c

index a3312b7c49073ddf6ddf42bc6e2d3f3753b36f6d..f2ecdeb3a90d441ee809af029a1db1c8dab80f48 100644 (file)
@@ -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;
                }