WSL2-Linux-Kernel/drivers/net/can/usb
Jesper Juhl a49bcabedc can: usb: PCAN-USB Pro: fix mem leaks in pcan_usb_pro_init() on error paths
If either call to pcan_usb_pro_send_req() in
drivers/net/can/usb/peak_usb/pcan_usb_pro.c::pcan_usb_pro_init()
fails, we'll leak the memory we allocated to 'usb_if' with kzalloc()
when the 'usb_if' variable goes out of scope without having been
assigned to anything as we 'return err;'.
Fix this by adding appropriate kfree(usb_if) calls to the error paths.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-04-16 21:34:50 +02:00
..
peak_usb can: usb: PCAN-USB Pro: fix mem leaks in pcan_usb_pro_init() on error paths 2012-04-16 21:34:50 +02:00
Kconfig can: usb: PEAK-System Technik USB adapters driver core 2012-03-03 17:40:51 +01:00
Makefile can: usb: PEAK-System Technik USB adapters driver core 2012-03-03 17:40:51 +01:00
ems_usb.c can: replace the dev_dbg/info/err/... with the new netdev_xxx macros 2012-02-03 01:21:26 +01:00
esd_usb2.c can: replace the dev_dbg/info/err/... with the new netdev_xxx macros 2012-02-03 01:21:26 +01:00