Commit d2f4460a authored by Gong Yuanjun's avatar Gong Yuanjun Committed by 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: default avatarGong Yuanjun <ruc_gongyuanjun@163.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment