USB: serial: io_edgeport: fix memory leak in edge_startup
authorPavel Skripkin <paskripkin@gmail.com>
Mon, 1 Mar 2021 23:01:52 +0000 (02:01 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:03:50 +0000 (17:03 +0100)
commit5287c3d62e912a09ba8488b1c7aeac0fe7b68f5e
treef375c27f15c4d1f64e1a0424084a91adbd2ea9fc
parentc1b20c6fac0549ac5c0a22698dd39ce01850988c
USB: serial: io_edgeport: fix memory leak in edge_startup

commit cfdc67acc785e01a8719eeb7012709d245564701 upstream.

sysbot found memory leak in edge_startup().
The problem was that when an error was received from the usb_submit_urb(),
nothing was cleaned up.

Reported-by: syzbot+59f777bdcbdd7eea5305@syzkaller.appspotmail.com
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Fixes: 6e8cf7751f9f ("USB: add EPIC support to the io_edgeport driver")
Cc: stable@vger.kernel.org # 2.6.21: c5c0c55598ce
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/io_edgeport.c