|
@@ -4702,7 +4702,6 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid,
|
|
}
|
|
}
|
|
|
|
|
|
nla_nest_end(msg, tidsattr);
|
|
nla_nest_end(msg, tidsattr);
|
|
- kfree(sinfo->pertid);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
nla_nest_end(msg, sinfoattr);
|
|
nla_nest_end(msg, sinfoattr);
|
|
@@ -4712,10 +4711,12 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid,
|
|
sinfo->assoc_req_ies))
|
|
sinfo->assoc_req_ies))
|
|
goto nla_put_failure;
|
|
goto nla_put_failure;
|
|
|
|
|
|
|
|
+ cfg80211_sinfo_release_content(sinfo);
|
|
genlmsg_end(msg, hdr);
|
|
genlmsg_end(msg, hdr);
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
nla_put_failure:
|
|
nla_put_failure:
|
|
|
|
+ cfg80211_sinfo_release_content(sinfo);
|
|
genlmsg_cancel(msg, hdr);
|
|
genlmsg_cancel(msg, hdr);
|
|
return -EMSGSIZE;
|
|
return -EMSGSIZE;
|
|
}
|
|
}
|
|
@@ -4797,8 +4798,10 @@ static int nl80211_get_station(struct sk_buff *skb, struct genl_info *info)
|
|
return err;
|
|
return err;
|
|
|
|
|
|
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
|
|
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
|
|
- if (!msg)
|
|
|
|
|
|
+ if (!msg) {
|
|
|
|
+ cfg80211_sinfo_release_content(sinfo);
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
|
|
+ }
|
|
|
|
|
|
if (nl80211_send_station(msg, NL80211_CMD_NEW_STATION,
|
|
if (nl80211_send_station(msg, NL80211_CMD_NEW_STATION,
|
|
info->snd_portid, info->snd_seq, 0,
|
|
info->snd_portid, info->snd_seq, 0,
|
|
@@ -14624,8 +14627,10 @@ void cfg80211_del_sta_sinfo(struct net_device *dev, const u8 *mac_addr,
|
|
trace_cfg80211_del_sta(dev, mac_addr);
|
|
trace_cfg80211_del_sta(dev, mac_addr);
|
|
|
|
|
|
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
|
|
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
|
|
- if (!msg)
|
|
|
|
|
|
+ if (!msg) {
|
|
|
|
+ cfg80211_sinfo_release_content(sinfo);
|
|
return;
|
|
return;
|
|
|
|
+ }
|
|
|
|
|
|
if (nl80211_send_station(msg, NL80211_CMD_DEL_STATION, 0, 0, 0,
|
|
if (nl80211_send_station(msg, NL80211_CMD_DEL_STATION, 0, 0, 0,
|
|
rdev, dev, mac_addr, sinfo) < 0) {
|
|
rdev, dev, mac_addr, sinfo) < 0) {
|