OpenCloudOS-Kernel/drivers/rpmsg
Colin Ian King 940c620d6a rpmsg: smd: fix memory leak on channel create
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: 53e2822e56 ("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>
2018-09-27 20:11:11 -07:00
..
Kconfig rpmsg: Switch to SPDX license identifier 2018-06-03 17:37:11 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qcom_glink_native.c rpmsg: glink: Remove chunk size word align warning 2018-09-01 14:00:43 -07:00
qcom_glink_native.h rpmsg: glink: Switch to SPDX license identifier 2018-06-03 17:37:15 -07:00
qcom_glink_rpm.c rpmsg: glink: Switch to SPDX license identifier 2018-06-03 17:37:15 -07:00
qcom_glink_smem.c rpmsg: Convert to using %pOFn instead of device_node.name 2018-08-27 20:07:15 -07:00
qcom_smd.c rpmsg: smd: fix memory leak on channel create 2018-09-27 20:11:11 -07:00
rpmsg_char.c rpmsg: char: Migrate to iter versions of read and write 2018-08-27 17:06:57 -07:00
rpmsg_core.c rpmsg: core: add support to power domains for devices 2018-07-30 23:32:03 -07:00
rpmsg_internal.h rpmsg: Switch to SPDX license identifier 2018-06-03 17:37:11 -07:00
virtio_rpmsg_bus.c rpmsg: virtio_rpmsg_bus: Switch to SPDX license identifier 2018-06-03 17:37:13 -07:00