Mesa (staging/21.2): radeonsi: Fix leak of screen->perfcounters.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Oct 14 20:22:36 UTC 2021
Module: Mesa
Branch: staging/21.2
Commit: 121359791d28e874c865c4f0e9385f64089ea6b8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=121359791d28e874c865c4f0e9385f64089ea6b8
Author: Emma Anholt <emma at anholt.net>
Date: Tue Oct 12 13:40:42 2021 -0700
radeonsi: Fix leak of screen->perfcounters.
A refactor dropped one of the frees.
Fixes: 380ac288911d ("ac: import performance counters from RadeonSI")
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13322>
(cherry picked from commit 4721352f975c752673e8073fb2fe627eb358d9f4)
---
.pick_status.json | 2 +-
src/gallium/drivers/radeonsi/si_perfcounter.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index 16a5df46c47..94b7aa3c931 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -418,7 +418,7 @@
"description": "radeonsi: Fix leak of screen->perfcounters.",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "380ac288911d65cca402fd51d524f47658c13b63"
},
diff --git a/src/gallium/drivers/radeonsi/si_perfcounter.c b/src/gallium/drivers/radeonsi/si_perfcounter.c
index b553a36b424..23a0d82c500 100644
--- a/src/gallium/drivers/radeonsi/si_perfcounter.c
+++ b/src/gallium/drivers/radeonsi/si_perfcounter.c
@@ -643,6 +643,7 @@ void si_destroy_perfcounters(struct si_screen *screen)
return;
ac_destroy_perfcounters(&pc->base);
+ FREE(pc);
screen->perfcounters = NULL;
}
More information about the mesa-commit
mailing list