Message ID | 1583069198-21060-1-git-send-email-qiwuchen55@gmail.com |
---|---|
State | New |
Headers | show |
Series | cpufreq: fix a mem leak caused by policy->max_freq_req in cpufreq_policy_free() | expand |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index cbe6c94..6756f7a 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1280,6 +1280,8 @@ static void cpufreq_policy_free(struct cpufreq_policy *policy) blocking_notifier_call_chain(&cpufreq_policy_notifier_list, CPUFREQ_REMOVE_POLICY, policy); freq_qos_remove_request(policy->max_freq_req); + kfree(policy->max_freq_req); + policy->max_freq_req = NULL; } freq_qos_remove_request(policy->min_freq_req);