提交 541d54e4 编写于 作者: Nickthink's avatar Nickthink 提交者: Alex Deucher

drm/amd/pm: Fix a potential gpu_metrics_table memory leak

Memory is allocated for gpu_metrics_table in
smu_v13_0_5_init_smc_tables(), but not freed in
smu_v13_0_5_fini_smc_tables(). This may cause memory leaks, fix it.
Reviewed-by: NEvan Quan <evan.quan@amd.com>
Signed-off-by: Nickthink's avatarZhen Ni <nizhen@uniontech.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 5afb7652
......@@ -176,6 +176,9 @@ static int smu_v13_0_5_fini_smc_tables(struct smu_context *smu)
kfree(smu_table->watermarks_table);
smu_table->watermarks_table = NULL;
kfree(smu_table->gpu_metrics_table);
smu_table->gpu_metrics_table = NULL;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册