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>
This commit is contained in:
committed by
John W. Linville
parent
a796a1dd5d
commit
1474a89838
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user