projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60deb9f
)
wifi: mac80211: always free sta in __sta_info_alloc in case of error
author
Lorenzo Bianconi
<lorenzo@kernel.org>
Tue, 23 Aug 2022 13:22:23 +0000
(15:22 +0200)
committer
Johannes Berg
<johannes.berg@intel.com>
Thu, 25 Aug 2022 08:01:16 +0000
(10:01 +0200)
Free sta pointer in __sta_info_alloc routine if sta_info_alloc_link()
fails.
Fixes: 246b39e4a1ba5 ("wifi: mac80211: refactor some sta_info link handling")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link:
https://lore.kernel.org/r/a3d079208684cddbc25289f7f7e0fed795b0cad4.1661260857.git.lorenzo@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/sta_info.c
patch
|
blob
|
history
diff --git
a/net/mac80211/sta_info.c
b/net/mac80211/sta_info.c
index cb23da9aff1e6952971b907f0e1ee25a6d744016..330dab41f2fef5a2f9ed22c365478bd4580f808a 100644
(file)
--- a/
net/mac80211/sta_info.c
+++ b/
net/mac80211/sta_info.c
@@
-494,7
+494,7
@@
__sta_info_alloc(struct ieee80211_sub_if_data *sdata,
sta->sdata = sdata;
if (sta_info_alloc_link(local, &sta->deflink, gfp))
-
return NULL
;
+
goto free
;
if (link_id >= 0) {
sta_info_add_link(sta, link_id, &sta->deflink,