rtl8xxxu: prevent leaking urb
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Fri, 20 Sep 2019 03:00:41 +0000 (22:00 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 2 Oct 2019 04:31:26 +0000 (07:31 +0300)
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c

index c6c41fb..776bbae 100644 (file)
@@ -5444,6 +5444,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;
        }