diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-09-28 00:36:27 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-13 22:08:55 +0300 |
commit | 9632c0339b1217e280f693161498c3152c9c7bb3 (patch) | |
tree | 7086c0913c8ea1dc127b41106d288b4348878a69 /fs/cramfs | |
parent | 64537fda9a6aad48ed26601026e1d5f2efdc95c4 (diff) | |
download | linux-9632c0339b1217e280f693161498c3152c9c7bb3.tar.xz |
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 'fs/cramfs')
0 files changed, 0 insertions, 0 deletions