]> git.hungrycats.org Git - linux/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Mar 2017 05:44:16 +0000 (06:44 +0100)
commitc903cc53f760a6b3c246bc74a89239492578a48b
treea7e277969e2ad35017fa1c36e4b2160e18ceff16
parente9394d5a762dc04958ea933bd5d2df096491ea04
can: usb_8dev: Fix memory leak of priv->cmd_msg_buffer

commit 7c42631376306fb3f34d51fda546b50a9b6dd6ec upstream.

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

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/usb/usb_8dev.c