net: usb: fix memory leak in smsc75xx_bind
Syzbot reported memory leak in smsc75xx_bind(). The problem was is non-freed memory in case of errors after memory allocation. backtrace: [<ffffffff84245b62>] kmalloc include/linux/slab.h:556 [inline] [<ffffffff84245b62>] kzalloc include/linux/slab.h:686 [inline] [<ffffffff84245b62>] smsc75xx_bind+0x7a/0x334 drivers/net/usb/smsc75xx.c:1460 [<ffffffff82b5b2e6>] usbnet_probe+0x3b6/0xc30 drivers/net/usb/usbnet.c:1728 Fixes: d0cad871 ("smsc75xx: SMSC LAN75xx USB gigabit ethernet adapter driver") Cc: stable@kernel.vger.org Reported-and-tested-by:<syzbot+b558506ba8165425fee2@syzkaller.appspotmail.com> Signed-off-by:
Pavel Skripkin <paskripkin@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
parent
48b491a5
-
mentioned in commit 9e6b8c1f
-
mentioned in commit 9e6a3ecc
-
mentioned in commit 200dbfca
-
mentioned in commit 22c84059
-
mentioned in commit 570a52cf
-
mentioned in commit 4252bf6c
-
mentioned in commit c4e3be2e
-
mentioned in commit 2fc8300c
-
mentioned in commit 7cc8b2e0
-
mentioned in commit 64160d17
Please register or sign in to comment