提交 d2f4460a 编写于 作者: G Gong Yuanjun 提交者: Alex Deucher

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

gpu_metrics_table is allocated in yellow_carp_init_smc_tables() but
not freed in yellow_carp_fini_smc_tables().
Signed-off-by: NGong Yuanjun <ruc_gongyuanjun@163.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 a2b28708
...@@ -190,6 +190,9 @@ static int yellow_carp_fini_smc_tables(struct smu_context *smu) ...@@ -190,6 +190,9 @@ static int yellow_carp_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;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册