aboutsummaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c5
-rw-r--r--net/wireless/scan.c3
2 files changed, 4 insertions, 4 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 2a04beba436..4478760b7dc 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1010,7 +1010,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
if (IS_ERR(hdr)) {
err = PTR_ERR(hdr);
- goto out;
+ goto free_msg;
}
cookie.msg = msg;
@@ -1024,7 +1024,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
&cookie, get_key_callback);
if (err)
- goto out;
+ goto free_msg;
if (cookie.error)
goto nla_put_failure;
@@ -1035,6 +1035,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
nla_put_failure:
err = -ENOBUFS;
+ free_msg:
nlmsg_free(msg);
out:
cfg80211_unlock_rdev(rdev);
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 4f552c3f29a..decc59fe0ee 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -48,8 +48,6 @@ void __cfg80211_scan_done(struct work_struct *wk)
else
nl80211_send_scan_done(wiphy_to_dev(request->wiphy), dev);
- wiphy_to_dev(request->wiphy)->scan_req = NULL;
-
#ifdef CONFIG_WIRELESS_EXT
if (!request->aborted) {
memset(&wrqu, 0, sizeof(wrqu));
@@ -62,6 +60,7 @@ void __cfg80211_scan_done(struct work_struct *wk)
out:
cfg80211_unlock_rdev(rdev);
+ wiphy_to_dev(request->wiphy)->scan_req = NULL;
kfree(request);
}