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:41:01 +0000 (17:41 +0100)
commit3513785dc13f91ba440d315eca7ae21a55883047
tree7a0713e136a48d72c3d2f6b8c80e9050a6f059bd
parent855485d31e2ac011c2ce7031674c8b5c73321cc4
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