Skip to content
Commit 940c620d authored by Colin Ian King's avatar Colin Ian King Committed by Bjorn Andersson
Browse files

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: 53e2822e ("rpmsg: Introduce Qualcomm SMD backend")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent f0beb4ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment