Re: [PATCH] usb: misc: usbio: Fix URB memory leak on submit failure

From: Oliver Neukum

Date: Mon Mar 30 2026 - 13:29:23 EST


On 30.03.26 17:47, Felix Gu wrote:
When usb_submit_urb() fails in usbio_probe(), the previously allocated
URB is never freed, causing a memory leak.

Add usb_free_urb() call to properly release the URB on the error path.

Hi,

the driver uses goto to unwind. Could you use the existing code
with an additional label defined?

Regards
Oliver