]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
rtl8xxxu: prevent leaking urb
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Fri, 20 Sep 2019 03:00:41 +0000 (22:00 -0500)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:00:53 +0000 (01:00 -0500)
BugLink: https://bugs.launchpad.net/bugs/1862227
commit a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c upstream.

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>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c

index c0926ecc61bcff390edc56d865b44059acbb6353..0791192579cb0cafa985b3d8965763a7e3e64959 100644 (file)
@@ -5446,6 +5446,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;
        }