Skip to content

Commit

Permalink
rtlwifi: Don't leak on error in _rtl_usb_receive()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jjuhl authored and linvjw committed Jan 2, 2013
1 parent a796a1d commit 1474a89
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/rtlwifi/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1474a89

Please sign in to comment.