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-17 13:45:24 +0200
commit4ee1769b497fba9dcdc6af249ba73a34decbbbff (patch)
treec7894602d0d093c5e1b9dbb2e5948ba123d997ae /drivers/atm
parentfb7540c25bd01aa7b99a66a8eec7c0ac4dfb00e4 (diff)
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 112b1001c269..ef395b238816 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;
}
}