From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Dinghao Liu <dinghao.liu@zju.edu.cn>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 4.4 02/10] firestream: Fix memleak in fs_open
Date: Mon, 7 Sep 2020 12:35:35 -0400 [thread overview]
Message-ID: <20200907163543.1281889-2-sashal@kernel.org> (raw)
In-Reply-To: <20200907163543.1281889-1-sashal@kernel.org>
From: Dinghao Liu <dinghao.liu@zju.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@zju.edu.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.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
next prev parent reply other threads:[~2020-09-07 16:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-07 16:35 [PATCH AUTOSEL 4.4 01/10] drivers/net/wan/lapbether: Added needed_tailroom Sasha Levin
2020-09-07 16:35 ` Sasha Levin [this message]
2020-09-07 16:35 ` [PATCH AUTOSEL 4.4 03/10] drivers/net/wan/lapbether: Set network_header before transmitting Sasha Levin
2020-09-07 16:35 ` [PATCH AUTOSEL 4.4 04/10] cfg80211: regulatory: reject invalid hints Sasha Levin
2020-09-07 16:35 ` [PATCH AUTOSEL 4.4 05/10] net: usb: Fix uninit-was-stored issue in asix_read_phy_addr() Sasha Levin
2020-09-07 16:35 ` [PATCH AUTOSEL 4.4 07/10] drivers/net/wan/hdlc_cisco: Add hard_header_len Sasha Levin
2020-09-07 16:35 ` [PATCH AUTOSEL 4.4 08/10] net: usb: dm9601: Add USB ID of Keenetic Plus DSL Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200907163543.1281889-2-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=dinghao.liu@zju.edu.cn \
--cc=linux-atm-general@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).