diff options
author | Gong Yuanjun <ruc_gongyuanjun@163.com> | 2022-05-17 12:57:46 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-05-26 21:56:31 +0300 |
commit | d2f4460a3d9502513419f06cc376c7ade49d5753 (patch) | |
tree | 707ef79dca172b43e7df0047bb8a6012bd7e5de0 /drivers/gpu/drm | |
parent | a2b28708b645c5632dc93669ab06e97874c8244f (diff) | |
download | linux-d2f4460a3d9502513419f06cc376c7ade49d5753.tar.xz |
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: Gong Yuanjun <ruc_gongyuanjun@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c index 87257b1b028f..feff4f8c927c 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c @@ -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; } |