diff options
author | Samuel Pitoiset <[email protected]> | 2015-12-16 22:54:30 +0100 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-12-16 21:52:43 -0500 |
commit | 695ae816da2fd9739eac769820bee8b7b4a87d95 (patch) | |
tree | ef58c38f8778667c2372954806e37d10f7702274 /src | |
parent | f992d02ba2c7b1880ae1ce9ed9a1a24cb16239f4 (diff) |
nv50: free memory allocated by the prog which reads MP perf counters
This fixes a memory leak introduced in 6a9c151
("nv50: add compute-related MP perf counters on G84+")
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Cc: "11.1" <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_screen.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 1e4b75f18e0..ee43d8ff535 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -405,6 +405,11 @@ nv50_screen_destroy(struct pipe_screen *pscreen) if (screen->blitter) nv50_blitter_destroy(screen); + if (screen->pm.prog) { + screen->pm.prog->code = NULL; /* hardcoded, don't FREE */ + nv50_program_destroy(NULL, screen->pm.prog); + FREE(screen->pm.prog); + } nouveau_bo_ref(NULL, &screen->code); nouveau_bo_ref(NULL, &screen->tls_bo); |