[Beignet] [PATCH] Free context devices on context release
Giuseppe Bilotta
giuseppe.bilotta at gmail.com
Thu Feb 9 22:13:09 UTC 2017
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
More information about the Beignet
mailing list