projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
645acc6
)
wifi: mac80211: mlme: fix memory leak
author
Johannes Berg
<johannes.berg@intel.com>
Thu, 18 Apr 2024 08:52:21 +0000
(10:52 +0200)
committer
Johannes Berg
<johannes.berg@intel.com>
Fri, 19 Apr 2024 08:02:12 +0000
(10:02 +0200)
When re-parsing the elements here (with changed mode), free
the original ones first to avoid leaking memory.
Fixes:
310c8387c638
("wifi: mac80211: clean up connection process")
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link:
https://msgid.link/20240418105220.458421e3bbff.Icb5b84cba3ea420794cf009cf18ec3d76e434736@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c
patch
|
blob
|
history
diff --git
a/net/mac80211/mlme.c
b/net/mac80211/mlme.c
index
98cb475
..
6fa3752
100644
(file)
--- a/
net/mac80211/mlme.c
+++ b/
net/mac80211/mlme.c
@@
-753,8
+753,10
@@
again:
}
/* the mode can only decrease, so this must terminate */
- if (ap_mode != conn->mode)
+ if (ap_mode != conn->mode) {
+ kfree(elems);
goto again;
+ }
mlme_link_id_dbg(sdata, link_id,
"connecting with %s mode, max bandwidth %d MHz\n",