LGTM.

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Homer Hsing
Sent: Monday, November 04, 2013 4:29 PM
To: [email protected]
Subject: [Beignet] [PATCH] release previous kernel in cl_kernel_init

Signed-off-by: Homer Hsing <[email protected]>
---
 utests/utest_helper.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/utests/utest_helper.cpp b/utests/utest_helper.cpp index 
207e30c..3e45e63 100644
--- a/utests/utest_helper.cpp
+++ b/utests/utest_helper.cpp
@@ -263,6 +263,8 @@ cl_kernel_init(const char *file_name, const char 
*kernel_name, int format, const
   OCL_CALL (clBuildProgram, program, 1, &device, build_opt, NULL, NULL);
 
   /* Create a kernel from the program */
+  if (kernel)
+    clReleaseKernel(kernel);
   kernel = clCreateKernel(program, kernel_name, &status);
   if (status != CL_SUCCESS) {
     fprintf(stderr, "error calling clCreateKernel\n");
--
1.8.3.2

_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to