提交 1474a898 编写于 作者: J Jesper Juhl 提交者: 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: NJesper Juhl <jj@chaosbits.net>
Acked-by: NLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册