nvc0: free memory allocated by the prog which reads MP perf counters
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 16 Dec 2015 20:47:27 +0000 (21:47 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 16 Dec 2015 21:00:57 +0000 (22:00 +0100)
This fixes a long time ago memory leak (even before all my query
related changes).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c

index 461fcaaf677566c3922076eab56cbcc0b5f40a28..4757fe2dfc63fa6edb9d498317538c9179149a63 100644 (file)
@@ -428,6 +428,7 @@ nvc0_screen_destroy(struct pipe_screen *pscreen)
    if (screen->pm.prog) {
       screen->pm.prog->code = NULL; /* hardcoded, don't FREE */
       nvc0_program_destroy(NULL, screen->pm.prog);
+      FREE(screen->pm.prog);
    }
 
    nouveau_bo_ref(NULL, &screen->text);