提交 707554b4 编写于 作者: O Ola Olsson 提交者: Johannes Berg

nl80211: Fix potential memory leak in nl80211_connect

Free cached keys if the last early return path is taken.
Signed-off-by: NOla Olsson <ola.olsson@sonymobile.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 e5dbe070
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册