summaryrefslogtreecommitdiffstats
path: root/drivers/atm
diff options
context:
space:
mode:
authorDinghao Liu <dinghao.liu@zju.edu.cn>2020-08-23 19:29:35 +0800
committerDavid S. Miller <davem@davemloft.net>2020-08-24 18:02:43 -0700
commit15ac5cdafb9202424206dc5bd376437a358963f9 (patch)
tree31da1b1d676fbc1dfa9fd8ab2c61a8a60f454a6a /drivers/atm
parente2d79cd8875fa8c3cc7defa98a8cc99a1ed0c62f (diff)
downloadlinux-15ac5cdafb9202424206dc5bd376437a358963f9.tar.bz2
firestream: Fix memleak in fs_open
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>
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 2ca9ec802734..510250cf5c87 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -998,6 +998,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;
}
}