Commit 1474a898 authored by Jesper Juhl's avatar Jesper Juhl Committed by John W. Linville

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: default avatarJesper Juhl <jj@chaosbits.net>
Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent a796a1dd
...@@ -639,6 +639,7 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw) ...@@ -639,6 +639,7 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw)
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
"Failed to prep_rx_urb!!\n"); "Failed to prep_rx_urb!!\n");
err = PTR_ERR(skb); err = PTR_ERR(skb);
usb_free_urb(urb);
goto err_out; goto err_out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment