summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDinghao Liu <dinghao.liu@zju.edu.cn>2020-08-23 14:29:35 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-23 11:46:26 +0300
commit824a4ed2767d4568a0eece73fafe0141128b4d18 (patch)
treec64168b0b52c695586eebebc6084a5db861d7aad /drivers
parent60a585d4bc5d55bf866fa2d0cf6f17250ab6f49b (diff)
downloadlinux-824a4ed2767d4568a0eece73fafe0141128b4d18.tar.xz
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')
-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 0e449ee11ac7..e7cffd0cc361 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;
}
}