diff options
author | Dinghao Liu <dinghao.liu@zju.edu.cn> | 2020-08-23 19:29:35 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-24 18:02:43 -0700 |
commit | 15ac5cdafb9202424206dc5bd376437a358963f9 (patch) | |
tree | 31da1b1d676fbc1dfa9fd8ab2c61a8a60f454a6a /drivers/atm | |
parent | e2d79cd8875fa8c3cc7defa98a8cc99a1ed0c62f (diff) | |
download | linux-stable-15ac5cdafb9202424206dc5bd376437a358963f9.tar.gz linux-stable-15ac5cdafb9202424206dc5bd376437a358963f9.tar.bz2 linux-stable-15ac5cdafb9202424206dc5bd376437a358963f9.zip |
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.c | 1 |
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; } } |