Fix memory leaks when updating stats table
The address for an element in the per-cpu cpufreq_stats_table variable is overwritten in cpufreq_stats_update_policy_cpu(), but the memory allocated at the address that gets overwritten is not freed beforehand. Free the allocated memory beforehand to fix the memory leaks. Signed-off-by:Sultanxda <sultanxda@gmail.com> Signed-off-by:
Francisco Franco <franciscofranco.1990@gmail.com> Signed-off-by:
Luca Grifo <lg@linux.com> Signed-off-by:
djb77 <dwayne.bakewell@gmail.com> Used commit: https://github.com/Siddhant-Naik/TheFlash-Kernel-A5-A7-2017/commit/98bd2052dfc9757832c49b7a8c68157b8baea13f
Loading
Please register or sign in to comment