Skip to content

Commit

Permalink
cfg80211: fix crash in cfg80211_set_freq()
Browse files Browse the repository at this point in the history
Since wdev can be NULL, check it before dereferencing it

Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
Felix Fietkau authored and linvjw committed May 21, 2010
1 parent b9f2e39 commit 9fbc630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/wireless/chan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9fbc630

Please sign in to comment.