ChangeSet 1.1147, 2003/09/24 14:32:19-07:00, green@linuxhacker.ru [PATCH] USB: devio.c memleak on unexpected disconnect There is a memleak in devio.c (User space communication with USB devices) recently added, it forgets to free the buffer if device was disconnected. The patch is trivial, please apply. Found with help of smatch. drivers/usb/devio.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -Nru a/drivers/usb/devio.c b/drivers/usb/devio.c --- a/drivers/usb/devio.c Thu Sep 25 16:03:45 2003 +++ b/drivers/usb/devio.c Thu Sep 25 16:03:45 2003 @@ -1114,7 +1114,7 @@ usb_driver_release_interface (driver, ifp); up (&driver->serialize); } else - return -ENODATA; + retval = -ENODATA; break; /* let kernel drivers try to (re)bind to the interface */