]> git.baikalelectronics.ru Git - kernel.git/commit
can: pcan_usb_core: fix memory leak on failure paths in peak_usb_start()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Wed, 4 Sep 2013 21:46:09 +0000 (01:46 +0400)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 20 Sep 2013 18:58:21 +0000 (20:58 +0200)
commit9c65a089fe7a5466035eaf822653b557250157e3
tree39f29ad50fc76d1384ccf71859035084aa983c6a
parent240c5e682fe3562d8887fa106b8b19e318a0b2d7
can: pcan_usb_core: fix memory leak on failure paths in peak_usb_start()

Tx and rx urbs are not deallocated if something goes wrong in peak_usb_start().
The patch fixes error handling to deallocate all the resources.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/peak_usb/pcan_usb_core.c