diff options
author | Jesper Juhl <jj@chaosbits.net> | 2012-04-11 23:23:41 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2012-04-16 21:34:50 +0200 |
commit | a49bcabedc18319f673319d5e71b5751e3978179 (patch) | |
tree | beefbfa8bee452e5876bff2fef0b49b397c1b332 /net/sched | |
parent | 8a9a0ea6032186e3030419262678d652b88bf6a8 (diff) |
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>
Diffstat (limited to 'net/sched')
0 files changed, 0 insertions, 0 deletions