drm/amd/pm: fix a potential gpu_metrics_table memory leak
[ Upstream commitaa464957f7
] Memory is allocated for gpu_metrics_table in renoir_init_smc_tables(), but not freed in int smu_v12_0_fini_smc_tables(). Free it! Fixes:95868b8576
("drm/amd/powerplay: add Renoir support for gpu metrics export") Signed-off-by: Lang Yu <lang.yu@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cc98ef7841
commit
257b3bb166
@ -191,6 +191,9 @@ int smu_v12_0_fini_smc_tables(struct smu_context *smu)
|
|||||||
kfree(smu_table->watermarks_table);
|
kfree(smu_table->watermarks_table);
|
||||||
smu_table->watermarks_table = NULL;
|
smu_table->watermarks_table = NULL;
|
||||||
|
|
||||||
|
kfree(smu_table->gpu_metrics_table);
|
||||||
|
smu_table->gpu_metrics_table = NULL;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user