]> git.baikalelectronics.ru Git - kernel.git/commit
can: usb_8dev: Fix memory leak of priv->cmd_msg_buffer
authorMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 2 Mar 2017 11:03:40 +0000 (12:03 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 3 Mar 2017 12:00:07 +0000 (13:00 +0100)
commite44be4bf043861b88c8097be297df99e0cf6f3af
treed34ad66c8d1c6a8808b0a22b5cfeb5ac1abd97f4
parentd2836ef280cb5cf2f2f8919dff386b061583801a
can: usb_8dev: Fix memory leak of priv->cmd_msg_buffer

The priv->cmd_msg_buffer is allocated in the probe function, but never
kfree()ed. This patch converts the kzalloc() to resource-managed
kzalloc.

Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/usb_8dev.c