]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
usb: misc: usbio: Fix URB memory leak on submit failure
authorFelix Gu <ustc.gu@gmail.com>
Tue, 31 Mar 2026 12:05:08 +0000 (20:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2026 07:36:36 +0000 (09:36 +0200)
commit33cfe0709b6bf1a7f1a16d5e8d65d003a71b6a21
tree3465d935bdbbd00c6221c64c60d6390354c9af75
parent8b7a42ecdcdeb55580d9345412f7f8fc5aca3f6c
usb: misc: usbio: Fix URB memory leak on submit failure

When usb_submit_urb() fails in usbio_probe(), the previously allocated
URB is never freed, causing a memory leak.

Fix this by jumping to err_free_urb label to properly release the URB
on the error path.

Fixes: 121a0f839dbb ("usb: misc: Add Intel USBIO bridge driver")
Cc: stable <stable@kernel.org>
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Oliver Neukum <oneukum@suse.com>
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Link: https://patch.msgid.link/20260331-usbio-v2-1-d8c48dad9463@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/usbio.c