diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-05-15 15:46:17 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-21 14:40:00 -0400 |
commit | 9fbc630c89fd210e15ffe84fd6e968a2d39000b0 (patch) | |
tree | 7cd2283f43fcae0ce5779cffd976579977757989 /net | |
parent | b9f2e39d4c2bcd8e94f73ae14450d7764f930a41 (diff) | |
download | op-kernel-dev-9fbc630c89fd210e15ffe84fd6e968a2d39000b0.zip op-kernel-dev-9fbc630c89fd210e15ffe84fd6e968a2d39000b0.tar.gz |
cfg80211: fix crash in cfg80211_set_freq()
Since wdev can be NULL, check it before dereferencing it
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/chan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c index d92d088..b01a6f6 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -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) { |