提交 9fbc630c 编写于 作者: F Felix Fietkau 提交者: John W. Linville

cfg80211: fix crash in cfg80211_set_freq()

Since wdev can be NULL, check it before dereferencing it
Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 b9f2e39d
......@@ -50,7 +50,7 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
struct ieee80211_channel *chan;
int result;
if (wdev->iftype == NL80211_IFTYPE_MONITOR)
if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR)
wdev = NULL;
if (wdev) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册