summaryrefslogtreecommitdiff
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-09-01 12:58:02 -0700
committerJakub Kicinski <kuba@kernel.org>2022-09-01 12:58:02 -0700
commit60ad1100d525699bce83690757ff3077c6ab83ab (patch)
treefd25eb112f4d52f4f5209bb0c83b6c36d25793ae /net/mac80211/tx.c
parent4bf8594a8036f42ca7ece1bbdaf45b7954fb09e6 (diff)
parent42e66b1cc3a070671001f8a1e933a80818a192bf (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
tools/testing/selftests/net/.gitignore sort the net-next version and use it Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 51d564c8742b..1be8c9d83d6a 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -5924,6 +5924,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;
}
@@ -5938,7 +5939,7 @@ int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,
* for MLO STA, the SA should be the AP MLD address, but
* the link ID has been selected already
*/
- if (sta->sta.mlo)
+ if (sta && sta->sta.mlo)
memcpy(ehdr->h_source, sdata->vif.addr, ETH_ALEN);
}
rcu_read_unlock();