mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
wifi: cfg80211: fix potential requested_regd leak
If a custom regdomain is registered by a driver by calling regulatory_set_wiphy_regd() (the async one) before the wiphy is registered, and then registration fails or it's unregistered before the worker ran, we leak the regdomain. Free it on wiphy free. Link: https://patch.msgid.link/20261013151817.9c197c4779d4.I983cf65a625fbc99e13b0a2710167157c34b6cd9@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
7a79160f35
commit
a4190accbf
|
|
@ -1461,6 +1461,7 @@ void cfg80211_dev_free(struct cfg80211_registered_device *rdev)
|
|||
* can just free it here.
|
||||
*/
|
||||
kfree(rcu_dereference_raw(rdev->wiphy.regd));
|
||||
kfree(rdev->requested_regd);
|
||||
|
||||
kfree(rdev);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user