[PATCH] firestream: Fix memleak in fs_open

From: Dinghao Liu
Date: Sun Aug 23 2020 - 07:29:59 EST


When make_rate() fails, vcc should be freed just
like other error paths in fs_open().

Signed-off-by: Dinghao Liu <dinghao.liu@xxxxxxxxxx>
---
drivers/atm/firestream.c | 1 +
1 file changed, 1 insertion(+)

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;
}
}
--
2.17.1