can: peak_usb: fix mem leak in pcan_usb_pro_init()
authorMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 14 Dec 2013 13:36:25 +0000 (14:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 20:24:20 +0000 (12:24 -0800)
commitb52cc5df7872f64f206397a7dd3cfa2954725ea5
treeddbfebbd8e88a578f5387aa5699b42a703e5bb08
parentc045542c6809649fffaae86a8e84e39cb350965f
can: peak_usb: fix mem leak in pcan_usb_pro_init()

commit 20fb4eb96fb0350d28fc4d7cbfd5506711079592 upstream.

This patch fixes a memory leak in pcan_usb_pro_init(). In patch

    f14e224 net: can: peak_usb: Do not do dma on the stack

the struct pcan_usb_pro_fwinfo *fi and struct pcan_usb_pro_blinfo *bi were
converted from stack to dynamic allocation va kmalloc(). However the
corresponding kfree() was not introduced.

This patch adds the missing kfree().

Reported-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/usb/peak_usb/pcan_usb_pro.c