diff options
author | Dinghao Liu <dinghao.liu@zju.edu.cn> | 2020-08-23 19:29:35 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-23 08:46:09 +0200 |
commit | 5e3b1827189fb31b46ccf130efbfdb2992b7a825 (patch) | |
tree | 7a0464f881615d876832f6ec951dd865c03e9dd6 /drivers/atm | |
parent | 8d35eff779ccdd8ebb604478fa9041706f012655 (diff) | |
download | linux-rt-5e3b1827189fb31b46ccf130efbfdb2992b7a825.tar.gz |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 82296fe2ba3b..7cb2b863e653 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; } } |