[Beignet] [PATCH] Free context devices on context release

Yang, Rong R rong.r.yang at intel.com
Fri Feb 10 04:58:48 UTC 2017


LGTM, thanks, pushed.

> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Giuseppe Bilotta
> Sent: Friday, February 10, 2017 6:13
> To: Beignet ML <beignet at lists.freedesktop.org>
> Cc: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
> Subject: [Beignet] [PATCH] Free context devices on context release
> 
> The context owns the array of devices passed to cl_context_new, so it's its
> duty to free it.
> 
> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
> ---
>  src/cl_context.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/cl_context.c b/src/cl_context.c index cbe2e017..1ba23024
> 100644
> --- a/src/cl_context.c
> +++ b/src/cl_context.c
> @@ -383,6 +383,7 @@ cl_context_delete(cl_context ctx)
>    ctx->built_in_prgs = NULL;
> 
>    cl_free(ctx->prop_user);
> +  cl_free(ctx->devices);
>    cl_driver_delete(ctx->drv);
>    CL_OBJECT_DESTROY_BASE(ctx);
>    cl_free(ctx);
> --
> 2.11.1.658.g6a0cb3eb68
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list