[Mesa-dev] [PATCH] nvc0: free memory allocated by the prog which reads MP perf counters
Ilia Mirkin
imirkin at alum.mit.edu
Wed Dec 16 12:53:09 PST 2015
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable at lists.freedesktop.org>
On Wed, Dec 16, 2015 at 3:51 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> This fixes a long time ago memory leak (even before all my query
> related changes).
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>
> I just notified this by running 'valgrind --leak-check=yes' while
> monitoring some performance counters on my GF119.
>
> src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> index 461fcaa..4757fe2 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> @@ -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);
> --
> 2.6.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list