Commit 786c5be9 authored by Dmitry Antipov's avatar Dmitry Antipov Committed by Johannes Berg

wifi: mac80211: free skb on error path in ieee80211_beacon_get_ap()

In 'ieee80211_beacon_get_ap()', free allocated skb in case of error
returned by 'ieee80211_beacon_protect()'. Compile tested only.
Signed-off-by: default avatarDmitry Antipov <dmantipov@yandex.ru>
Link: https://patch.msgid.link/20240805142035.227847-1-dmantipov@yandex.ruSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 3a84454f
...@@ -5348,8 +5348,10 @@ ieee80211_beacon_get_ap(struct ieee80211_hw *hw, ...@@ -5348,8 +5348,10 @@ ieee80211_beacon_get_ap(struct ieee80211_hw *hw,
if (beacon->tail) if (beacon->tail)
skb_put_data(skb, beacon->tail, beacon->tail_len); skb_put_data(skb, beacon->tail, beacon->tail_len);
if (ieee80211_beacon_protect(skb, local, sdata, link) < 0) if (ieee80211_beacon_protect(skb, local, sdata, link) < 0) {
dev_kfree_skb(skb);
return NULL; return NULL;
}
ieee80211_beacon_get_finish(hw, vif, link, offs, beacon, skb, ieee80211_beacon_get_finish(hw, vif, link, offs, beacon, skb,
chanctx_conf, csa_off_base); chanctx_conf, csa_off_base);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment