]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
soc: fsl: dpaa2-console: free buffer before returning from dpaa2_console_read
authorRobert-Ionut Alexa <robert-ionut.alexa@nxp.com>
Fri, 23 Apr 2021 09:01:51 +0000 (12:01 +0300)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 7 Dec 2021 06:33:30 +0000 (07:33 +0100)
commit045f8a8c017c8a2435afce3f5ff3dea9a011dc4c
treecf7d16a01c78981c6138a1b37fdbff963ff7959a
parent94cc11ebc141527b1ebc6070d3990238ca0a16c3
soc: fsl: dpaa2-console: free buffer before returning from dpaa2_console_read

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit 8120bd469f5525da229953c1197f2b826c0109f4 ]

Free the kbuf buffer before returning from the dpaa2_console_read()
function. The variable no longer goes out of scope, leaking the storage
it points to.

Fixes: c93349d8c170 ("soc: fsl: add DPAA2 console support")
Signed-off-by: Robert-Ionut Alexa <robert-ionut.alexa@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/soc/fsl/dpaa2-console.c