diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-08-18 07:33:49 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-08-25 11:02:57 +0300 |
commit | 62b03f45c6352410d13bf0710d24ef6290632eb1 (patch) | |
tree | e346560ac43358ab66e9be8c61110284260401c4 /net/mac80211 | |
parent | 36fe8e4e5cb02131719612aea1e64379670d1846 (diff) | |
download | linux-62b03f45c6352410d13bf0710d24ef6290632eb1.tar.xz |
wifi: mac80211: fix possible leak in ieee80211_tx_control_port()
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>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/tx.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 45df9932d0ba..594bd70ee641 100644 --- 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; } |