]> git.baikalelectronics.ru Git - kernel.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>
Thu, 8 Dec 2022 10:22:56 +0000 (11:22 +0100)
commit0c135127ad5b8f19a57ca743592fd6aa7fcc0520
tree48db60f360e207162df2fd3d0cda4d20abf482ce
parent967a2c9578ace67880a2e8507c20e02e6fd53ef6
wifi: mac80211: fix memory free error when registering wiphy fail

[ Upstream commit 1cba046dd3ba35356d903adf4dbfc3f63eeedd13 ]

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