diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-09-27 22:36:27 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-13 11:15:12 -0800 |
commit | 7f46d951fd3389089500623a9f026e4d25be823a (patch) | |
tree | a22cfeaaa329ffd05c276909feba69707f63d70c /arch/arm/boot/dts/socfpga_arria10.dtsi | |
parent | ad2c712b50597ab70cdf9c75101518a6837d0e69 (diff) |
rpmsg: smd: fix memory leak on channel create
commit 940c620d6af8fca7d115de40f19870fba415efac upstream.
Currently a failed allocation of channel->name leads to an
immediate return without freeing channel. Fix this by setting
ret to -ENOMEM and jumping to an exit path that kfree's channel.
Detected by CoverityScan, CID#1473692 ("Resource Leak")
Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend")
Cc: stable@vger.kernel.org
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm/boot/dts/socfpga_arria10.dtsi')
0 files changed, 0 insertions, 0 deletions