diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-05-21 11:42:58 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-05-21 11:42:58 +0300 |
commit | dee8f20e61aea655a43b74e5b65bcc6fbc69df7b (patch) | |
tree | 0a7eb306878c784cdc02c5788d264b42942ca298 | |
parent | 8bd6d5f1faffb560ec4ed3f72ab6b7be10985924 (diff) | |
parent | cea04f3d9aeebda9d9c063c0dfa71e739c322c81 (diff) | |
download | linux-dee8f20e61aea655a43b74e5b65bcc6fbc69df7b.tar.xz |
Merge branch 'pm-cpufreq'
Merge an amd-pstate driver fix for 6.10-rc1:
- Fix a memory leak in the exit path of amd-pstate (Peng Ma).
* pm-cpufreq:
cpufreq: amd-pstate: fix memory leak on CPU EPP exit
-rw-r--r-- | drivers/cpufreq/amd-pstate.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 6a342b0c0140..1b7e82a0ad2e 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -1441,6 +1441,13 @@ free_cpudata1: static int amd_pstate_epp_cpu_exit(struct cpufreq_policy *policy) { + struct amd_cpudata *cpudata = policy->driver_data; + + if (cpudata) { + kfree(cpudata); + policy->driver_data = NULL; + } + pr_debug("CPU %d exiting\n", policy->cpu); return 0; } |