summaryrefslogtreecommitdiff
path: root/drivers/atm
diff options
context:
space:
mode:
authorDinghao Liu <dinghao.liu@zju.edu.cn>2020-08-23 19:29:35 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-23 08:46:09 +0200
commit5e3b1827189fb31b46ccf130efbfdb2992b7a825 (patch)
tree7a0464f881615d876832f6ec951dd865c03e9dd6 /drivers/atm
parent8d35eff779ccdd8ebb604478fa9041706f012655 (diff)
downloadlinux-rt-5e3b1827189fb31b46ccf130efbfdb2992b7a825.tar.gz
firestream: Fix memleak in fs_open
[ Upstream commit 15ac5cdafb9202424206dc5bd376437a358963f9 ] When make_rate() fails, vcc should be freed just like other error paths in fs_open(). Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/atm')
-rw-r--r--drivers/atm/firestream.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index 82296fe2ba3b..7cb2b863e653 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -1013,6 +1013,7 @@ static int fs_open(struct atm_vcc *atm_vcc)
error = make_rate (pcr, r, &tmc0, NULL);
if (error) {
kfree(tc);
+ kfree(vcc);
return error;
}
}