diff options
author | Dinghao Liu <dinghao.liu@zju.edu.cn> | 2020-08-23 13:29:35 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-25 03:02:43 +0200 |
commit | 15ac5cdafb9202424206dc5bd376437a358963f9 (patch) | |
tree | 31da1b1d676fbc1dfa9fd8ab2c61a8a60f454a6a /drivers/atm | |
parent | net: arc_emac: Fix memleak in arc_mdio_probe (diff) | |
download | linux-15ac5cdafb9202424206dc5bd376437a358963f9.tar.xz linux-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; } } |