projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36a44bc
)
nl80211: fix potential leak in AP start
author
Johannes Berg
<johannes.berg@intel.com>
Fri, 21 Feb 2020 09:41:43 +0000
(10:41 +0100)
committer
Johannes Berg
<johannes.berg@intel.com>
Fri, 21 Feb 2020 09:50:26 +0000
(10:50 +0100)
If nl80211_parse_he_obss_pd() fails, we leak the previously
allocated ACL memory. Free it in this case.
Fixes: 796e90f42b7e ("cfg80211: add support for parsing OBBS_PD attributes")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link:
https://lore.kernel.org/r/20200221104142.835aba4cdd14.I1923b55ba9989c57e13978f91f40bfdc45e60cbd@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c
patch
|
blob
|
history
diff --git
a/net/wireless/nl80211.c
b/net/wireless/nl80211.c
index cedf17d4933f4ccdd8387dae144b75a8b43b9a53..46be40e19e7fceeca517981270cc73bac1c59498 100644
(file)
--- a/
net/wireless/nl80211.c
+++ b/
net/wireless/nl80211.c
@@
-4800,8
+4800,7
@@
static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
err = nl80211_parse_he_obss_pd(
info->attrs[NL80211_ATTR_HE_OBSS_PD],
¶ms.he_obss_pd);
- if (err)
- return err;
+ goto out;
}
nl80211_calculate_ap_params(¶ms);
@@
-4823,6
+4822,7
@@
static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
}
wdev_unlock(wdev);
+out:
kfree(params.acl);
return err;