Messages in this thread | | | From | Chris Chiu <> | Date | Fri, 20 Sep 2019 18:23:40 +0800 | Subject | Re: [PATCH] rtl8xxxu: prevent leaking urb |
| |
On Fri, Sep 20, 2019 at 11:01 AM Navid Emamdoost <navid.emamdoost@gmail.com> wrote: > > In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb > should be released. > > Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Chris Chiu <chiu@endlessm.com>
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > @@ -5443,6 +5443,7 @@ static int rtl8xxxu_submit_int_urb(struct ieee80211_hw *hw) > ret = usb_submit_urb(urb, GFP_KERNEL); > if (ret) { > usb_unanchor_urb(urb); > + usb_free_urb(urb); > goto error; > } You're right. There's a usb_alloc_urb in the beginning of this function and should be handled after submit failure.
Chris
| |