mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-11 18:26:02 +00:00
nl80211: Fix potential memory leak in nl80211_connect
Free cached keys if the last early return path is taken. Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
e5dbe0701a
commit
707554b4d1
@ -7941,8 +7941,10 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info)
|
||||
if (nla_get_flag(info->attrs[NL80211_ATTR_USE_RRM])) {
|
||||
if (!(rdev->wiphy.features &
|
||||
NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES) ||
|
||||
!(rdev->wiphy.features & NL80211_FEATURE_QUIET))
|
||||
!(rdev->wiphy.features & NL80211_FEATURE_QUIET)) {
|
||||
kzfree(connkeys);
|
||||
return -EINVAL;
|
||||
}
|
||||
connect.flags |= ASSOC_REQ_USE_RRM;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user