Skip to content

Commit 1474a89

Browse files
jjuhllinvjw
authored andcommitted
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 <[email protected]> Acked-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
1 parent a796a1d commit 1474a89

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/wireless/rtlwifi

1 file changed

+1
-0
lines changed

drivers/net/wireless/rtlwifi/usb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw)
639639
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
640640
"Failed to prep_rx_urb!!\n");
641641
err = PTR_ERR(skb);
642+
usb_free_urb(urb);
642643
goto err_out;
643644
}
644645

0 commit comments

Comments
 (0)