mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 13:59:45 -04:00
wifi: rtw89: check return value of ieee80211_probereq_get() for RNR
The return value of ieee80211_probereq_get() might be NULL, so check it
before using to avoid NULL pointer access.
Addresses-Coverity-ID: 1529805 ("Dereference null return value")
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240919081216.28505-2-pkshih@realtek.com
This commit is contained in:
@@ -6089,6 +6089,9 @@ static int rtw89_update_6ghz_rnr_chan(struct rtw89_dev *rtwdev,
|
||||
|
||||
skb = ieee80211_probereq_get(rtwdev->hw, rtwvif_link->mac_addr,
|
||||
NULL, 0, req->ie_len);
|
||||
if (!skb)
|
||||
return -ENOMEM;
|
||||
|
||||
skb_put_data(skb, ies->ies[NL80211_BAND_6GHZ], ies->len[NL80211_BAND_6GHZ]);
|
||||
skb_put_data(skb, ies->common_ies, ies->common_ie_len);
|
||||
hdr = (struct ieee80211_hdr *)skb->data;
|
||||
|
||||
Reference in New Issue
Block a user