]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 1 Dec 2022 12:50:41 +0000 (13:50 +0100)
commit13e5afd3d773c6fc6ca2b89027befaaaa1ea7293
tree76b5804c5cfe75a26e4428de7b07dd19c35874dd
parent5cc58b376675981386c6192405fe887cd29c527a
wifi: mac80211: fix memory leak in ieee80211_if_add()

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>
net/mac80211/iface.c