[igt-dev] [PATCH i-g-t] tests/gem_ccs: Fix memory leak in destroy_object
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Thu Dec 15 13:27:07 UTC 2022
On Wed, Dec 14, 2022 at 11:51:42AM +0100, Karolina Stolarek wrote:
> Free the copy object itself after gem_close
>
> Signed-off-by: Karolina Stolarek <karolina.stolarek at intel.com>
> ---
> tests/i915/gem_ccs.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tests/i915/gem_ccs.c b/tests/i915/gem_ccs.c
> index 4ecb3e36..00f08eea 100644
> --- a/tests/i915/gem_ccs.c
> +++ b/tests/i915/gem_ccs.c
> @@ -141,6 +141,7 @@ static void destroy_object(int i915, struct blt_copy_object *obj)
> munmap(obj->ptr, obj->size);
>
> gem_close(i915, obj->handle);
> + free(obj);
Yes, it is missing here:
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
--
Zbigniew
> }
>
> static void set_blt_object(struct blt_copy_object *obj,
> --
> 2.25.1
>
More information about the igt-dev
mailing list