]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
can: gs_usb: gs_make_candev(): fix memory leak for devices with extended bit timing...
authorMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 29 Mar 2022 19:29:43 +0000 (21:29 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 31 Mar 2022 07:55:27 +0000 (09:55 +0200)
commit50d34a0d151dc7abbdbec781bd7f09f2b3cbf01a
tree1332ce4f42624ffd542727ebb36701e47c121bcc
parent136bed0bfd3bc9c95c88aafff2d22ecb3a919f23
can: gs_usb: gs_make_candev(): fix memory leak for devices with extended bit timing configuration

Some CAN-FD capable devices offer extended bit timing information for
the data bit timing. The information must be read with an USB control
message. The memory for this message is allocated but not free()ed (in
the non error case). This patch adds the missing free.

Fixes: 6679f4c5e5a6 ("can: gs_usb: add extended bt_const feature")
Link: https://lore.kernel.org/all/20220329193450.659726-1-mkl@pengutronix.de
Reported-by: syzbot+4d0ae90a195b269f102d@syzkaller.appspotmail.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/gs_usb.c