]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: mac80211: fix memory leak in ieee80211_if_add()
authorZhengchao Shao <shaozhengchao@huawei.com>
Thu, 17 Nov 2022 06:45:00 +0000 (14:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:26:06 +0000 (13:26 +0100)
commit147537737a3c83e07a5295de38424c21d354d2a4
tree7f85ec29df120b00a306e0f480d5877adc5e5ad2
parent82980218a92fc4bc083a4798ef706334705b85b6
wifi: mac80211: fix memory leak in ieee80211_if_add()

[ Upstream commit 13e5afd3d773c6fc6ca2b89027befaaaa1ea7293 ]

When register_netdevice() failed in ieee80211_if_add(), ndev->tstats
isn't released. Fix it.

Fixes: 5a490510ba5f ("mac80211: use per-CPU TX/RX statistics")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Link: https://lore.kernel.org/r/20221117064500.319983-1-shaozhengchao@huawei.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/iface.c