[Beignet] [PATCH] Fix obvious copy-paste

Giuseppe Bilotta giuseppe.bilotta at gmail.com
Thu Feb 9 22:12:42 UTC 2017


The conditional was equal to the one before, and would never be hit
because internal kernels were reset after release. Instead, since the
body is resetting built-in kernels, it appears obvious that the
conditional should be on the existence of built-in kernels.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
---
 src/cl_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cl_context.c b/src/cl_context.c
index 3f2e7578..cbe2e017 100644
--- a/src/cl_context.c
+++ b/src/cl_context.c
@@ -373,7 +373,7 @@ cl_context_delete(cl_context ctx)
       ctx->internal_prgs[i] = NULL;
     }
 
-    if (ctx->internal_kernels[i]) {
+    if (ctx->built_in_kernels[i]) {
       cl_kernel_delete(ctx->built_in_kernels[i]);
       ctx->built_in_kernels[i] = NULL;
     }
-- 
2.11.1.658.g6a0cb3eb68



More information about the Beignet mailing list