summaryrefslogtreecommitdiffstats
path: root/net/mptcp
diff options
context:
space:
mode:
authorPavel Skripkin <paskripkin@gmail.com>2021-04-01 15:27:52 +0200
committerDavid S. Miller <davem@davemloft.net>2021-04-02 00:55:15 +0200
commita0b96b4a62745397aee662670cfc2157bac03f55 (patch)
treea4de8dcfa238716b99259f25706b7e3a5cf74ba1 /net/mptcp
parentnet: udp: Add support for getsockopt(..., ..., UDP_GRO, ..., ...); (diff)
downloadlinux-a0b96b4a62745397aee662670cfc2157bac03f55.tar.xz
linux-a0b96b4a62745397aee662670cfc2157bac03f55.zip
drivers: net: fix memory leak in peak_usb_create_dev
syzbot reported memory leak in peak_usb. The problem was in case of failure after calling ->dev_init()[2] in peak_usb_create_dev()[1]. The data allocated int dev_init() wasn't freed, so simple ->dev_free() call fix this problem. backtrace: [<0000000079d6542a>] kmalloc include/linux/slab.h:552 [inline] [<0000000079d6542a>] kzalloc include/linux/slab.h:682 [inline] [<0000000079d6542a>] pcan_usb_fd_init+0x156/0x210 drivers/net/can/usb/peak_usb/pcan_usb_fd.c:868 [2] [<00000000c09f9057>] peak_usb_create_dev drivers/net/can/usb/peak_usb/pcan_usb_core.c:851 [inline] [1] [<00000000c09f9057>] peak_usb_probe+0x389/0x490 drivers/net/can/usb/peak_usb/pcan_usb_core.c:949 Reported-by: syzbot+91adee8d9ebb9193d22d@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp')
0 files changed, 0 insertions, 0 deletions