summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2021-12-22 12:30:39 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2021-12-22 12:30:39 +0000
commitbce7e79f779d56034457019aafab1cc07e6a03f7 (patch)
treeaae29c037b057cc79afe7aaf6dbed4518ac5e102
parent36be4f613e7c3d99856d811a40e386dad3640d22 (diff)
drm/amd/pm: fix a potential gpu_metrics_table memory leak
From Lang Yu 222cebd995cdf11fe0d502749560f65e64990e55 in linux 5.10.y/5.10.88 aa464957f7e660abd554f2546a588f6533720e21 in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/pm/swsmu/smu12/smu_v12_0.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/pm/swsmu/smu12/smu_v12_0.c b/sys/dev/pci/drm/amd/pm/swsmu/smu12/smu_v12_0.c
index 9517f15f0f7..b9e5443f348 100644
--- a/sys/dev/pci/drm/amd/pm/swsmu/smu12/smu_v12_0.c
+++ b/sys/dev/pci/drm/amd/pm/swsmu/smu12/smu_v12_0.c
@@ -187,6 +187,9 @@ int smu_v12_0_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;
}