* [PATCH -next] wifi: mac80211: fix missing dev_kfree_skb() in error path in ieee80211_tx_control_port()
@ 2022-08-18 4:33 Yang Yingliang
0 siblings, 0 replies; only message in thread
From: Yang Yingliang @ 2022-08-18 4:33 UTC (permalink / raw)
To: linux-kernel, netdev, linux-wireless; +Cc: johannes
Add missing dev_kfree_skb() in error path in ieee80211_tx_control_port()
to avoid memory leak.
Fixes: dd820ed6336a ("wifi: mac80211: return error from control port TX for drops")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
net/mac80211/tx.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-18 4:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18 4:33 [PATCH -next] wifi: mac80211: fix missing dev_kfree_skb() in error path in ieee80211_tx_control_port() Yang Yingliang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).