]> git.proxmox.com Git - mirror_ubuntu-artful-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)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 13 Mar 2017 21:20:54 +0000 (15:20 -0600)
commitc943093a29d46fc09a1cf4c41205711f59cc5548
tree9dcd0ce312130696102bc19be6459644032fda3d
parent125941ae156b060b0a601279b7cdff012fa372ed
can: usb_8dev: Fix memory leak of priv->cmd_msg_buffer

BugLink: http://bugs.launchpad.net/bugs/1672544
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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/can/usb/usb_8dev.c