Skip to content

Commit

Permalink
drm/amd/pm: fix a potential gpu_metrics_table memory leak
Browse files Browse the repository at this point in the history
gpu_metrics_table is allocated in yellow_carp_init_smc_tables() but
not freed in yellow_carp_fini_smc_tables().

Signed-off-by: Gong Yuanjun <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
  • Loading branch information
AnnYugawa authored and alexdeucher committed May 26, 2022
1 parent a2b2870 commit d2f4460
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ static int yellow_carp_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;
}

Expand Down

0 comments on commit d2f4460

Please sign in to comment.