summaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorYuri Ershov <ext-yuri.ershov@nokia.com>2010-06-29 13:08:08 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-07-28 22:24:01 +0200
commitc4c322941ce0d7e2b7b8794ad70683123d9cb26a (patch)
tree05e21ce160325f8bbcec70abff35977fadd01ee2 /net/wireless/reg.c
parentnl80211: Fix memory leaks (diff)
downloadlinux-c4c322941ce0d7e2b7b8794ad70683123d9cb26a.tar.xz
linux-c4c322941ce0d7e2b7b8794ad70683123d9cb26a.zip
cfg80211: Update of regulatory request initiator handling
In some cases there could be possible dereferencing freed pointer. The update is intended to avoid this issue. Signed-off-by: Yuri Ershov <ext-yuri.ershov@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index ec4e76f95044..f180db0de66c 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1306,6 +1306,7 @@ static void reg_process_hint(struct regulatory_request *reg_request)
{
int r = 0;
struct wiphy *wiphy = NULL;
+ enum nl80211_reg_initiator initiator = reg_request->initiator;
BUG_ON(!reg_request->alpha2);
@@ -1325,7 +1326,7 @@ static void reg_process_hint(struct regulatory_request *reg_request)
/* This is required so that the orig_* parameters are saved */
if (r == -EALREADY && wiphy &&
wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY)
- wiphy_update_regulatory(wiphy, reg_request->initiator);
+ wiphy_update_regulatory(wiphy, initiator);
out:
mutex_unlock(&reg_mutex);
mutex_unlock(&cfg80211_mutex);