Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9fbc630c authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville
Browse files

cfg80211: fix crash in cfg80211_set_freq()



Since wdev can be NULL, check it before dereferencing it

Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b9f2e39d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {