Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20fb4eb9 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde
Browse files

can: peak_usb: fix mem leak in pcan_usb_pro_init()



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

    f14e2243 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().

Cc: linux-stable <stable@vger.kernel.org> # v3.10
Reported-by: default avatarStephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent a1c31f1d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -927,6 +927,9 @@ static int pcan_usb_pro_init(struct peak_usb_device *dev)
	/* set LED in default state (end of init phase) */
	pcan_usb_pro_set_led(dev, 0, 1);

	kfree(bi);
	kfree(fi);

	return 0;

 err_out: