projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36fe8e4
)
wifi: mac80211: fix possible leak in ieee80211_tx_control_port()
author
Yang Yingliang
<yangyingliang@huawei.com>
Thu, 18 Aug 2022 04:33:49 +0000
(12:33 +0800)
committer
Johannes Berg
<johannes.berg@intel.com>
Thu, 25 Aug 2022 08:02:57 +0000
(10:02 +0200)
Add missing dev_kfree_skb() in an error path in
ieee80211_tx_control_port() to avoid a memory leak.
Fixes:
dd820ed6336a
("wifi: mac80211: return error from control port TX for drops")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link:
https://lore.kernel.org/r/20220818043349.4168835-1-yangyingliang@huawei.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tx.c
patch
|
blob
|
blame
|
history
diff --git
a/net/mac80211/tx.c
b/net/mac80211/tx.c
index 45df9932d0ba15bcb375e34cf2fe8c5a9abe5bef..594bd70ee641a86106034712367d44bb5253745b 100644
(file)
--- a/
net/mac80211/tx.c
+++ b/
net/mac80211/tx.c
@@
-5885,6
+5885,7
@@
int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,
rcu_read_lock();
err = ieee80211_lookup_ra_sta(sdata, skb, &sta);
if (err) {
+ dev_kfree_skb(skb);
rcu_read_unlock();
return err;
}