projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5cc58b3
)
wifi: mac80211: fix memory leak in ieee80211_if_add()
author
Zhengchao Shao
<shaozhengchao@huawei.com>
Thu, 17 Nov 2022 06:45:00 +0000
(14:45 +0800)
committer
Johannes Berg
<johannes.berg@intel.com>
Thu, 1 Dec 2022 12:50:41 +0000
(13:50 +0100)
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
patch
|
blob
|
history
diff --git
a/net/mac80211/iface.c
b/net/mac80211/iface.c
index
7c4ce71
..
a578292
100644
(file)
--- a/
net/mac80211/iface.c
+++ b/
net/mac80211/iface.c
@@
-2195,6
+2195,7
@@
int ieee80211_if_add(struct ieee80211_local *local, const char *name,
ret = cfg80211_register_netdevice(ndev);
if (ret) {
+ ieee80211_if_free(ndev);
free_netdev(ndev);
return ret;
}