diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-07-30 17:32:05 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-07-31 11:51:17 +0300 |
commit | f12cac539fe07fe410f2776993e85d343c665141 (patch) | |
tree | 1875465fcc0219a4e5beeebe5a65cece5c985af6 /net/mac80211/agg-rx.c | |
parent | 2ab45876756fb6c132ae801b0939e0474f84c426 (diff) | |
download | linux-f12cac539fe07fe410f2776993e85d343c665141.tar.xz |
mac80211: add missing null return check from call to ieee80211_get_sband
The return from ieee80211_get_sband can potentially be a null pointer, so
it seems prudent to add a null check to avoid a null pointer dereference
on sband.
Addresses-Coverity: ("Dereference null return")
Fixes: 2ab45876756f ("mac80211: add support for the ADDBA extension element")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190730143205.14261-1-colin.king@canonical.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/agg-rx.c')
-rw-r--r-- | net/mac80211/agg-rx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index 0e1bb43973b8..4d1c335e06e5 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c @@ -189,6 +189,8 @@ static void ieee80211_add_addbaext(struct ieee80211_sub_if_data *sdata, u8 *pos; sband = ieee80211_get_sband(sdata); + if (!sband) + return; he_cap = ieee80211_get_he_iftype_cap(sband, sdata->vif.type); if (!he_cap) return; |