[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200907163220.1280412-9-sashal@kernel.org>
Date: Mon, 7 Sep 2020 12:31: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 5.8 09/53] 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 cc87004d5e2d6..5f22555933df1 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.25.1
Powered by blists - more mailing lists