]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: mac80211: fix memory free error when registering wiphy fail
authortaozhang <taozhang@bestechnic.com>
Sat, 15 Oct 2022 09:38:31 +0000 (17:38 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Dec 2022 16:39:57 +0000 (17:39 +0100)
commit2fcc593b5047183a2b0ed4e4c41ec1e911874911
tree95fe4b7096cd9b421ee7586b0deb50c9ee4684e5
parent044bc6d3c2c0e9090b0841e7b723875756534b45
wifi: mac80211: fix memory free error when registering wiphy fail

[ Upstream commit 50b2e8711462409cd368c41067405aa446dfa2af ]

ieee80211_register_hw free the allocated cipher suites when
registering wiphy fail, and ieee80211_free_hw will re-free it.

set wiphy_ciphers_allocated to false after freeing allocated
cipher suites.

Signed-off-by: taozhang <taozhang@bestechnic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/main.c