[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200907163543.1281889-2-sashal@kernel.org>
Date: Mon, 7 Sep 2020 12:35:35 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Dinghao Liu <dinghao.liu@....edu.cn>,
"David S . Miller" <davem@...emloft.net>,
Sasha Levin <sashal@...nel.org>,
linux-atm-general@...ts.sourceforge.net, netdev@...r.kernel.org
Subject: [PATCH AUTOSEL 4.4 02/10] firestream: Fix memleak in fs_open
From: Dinghao Liu <dinghao.liu@....edu.cn>
[ 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@....edu.cn>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/atm/firestream.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index 04b39d0da8681..70708608ab1e7 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -1009,6 +1009,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.25.1
Powered by blists - more mailing lists