[igt-dev] [PATCH i-g-t 1/4] gem_exec_gttfill: Plug memory leak

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 13 12:32:38 UTC 2019


Quoting Petri Latvala (2019-03-13 12:06:38)
> by freeing batches in fillgtt()
> 
> Signed-off-by: Petri Latvala <petri.latvala at intel.com>
> ---
>  tests/i915/gem_exec_gttfill.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/i915/gem_exec_gttfill.c b/tests/i915/gem_exec_gttfill.c
> index efd612bb..c5627c80 100644
> --- a/tests/i915/gem_exec_gttfill.c
> +++ b/tests/i915/gem_exec_gttfill.c
> @@ -196,6 +196,7 @@ static void fillgtt(int fd, unsigned ring, int timeout)
>                 munmap(batches[i].ptr, BATCH_SIZE);
>                 gem_close(fd, batches[i].handle);
>         }
> +       free(batches);

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the igt-dev mailing list