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 3e45e63..fca71e4 100644
--- a/utests/utest_helper.cpp
+++ b/utests/utest_helper.cpp
@@ -239,6 +239,8 @@ cl_kernel_init(const char *file_name, const char 
*kernel_name, int format, const
   cl_int status = CL_SUCCESS;
 
   /* Load the program and build it */
+  if (program)
+    clReleaseProgram(program);
   ker_path = cl_do_kiss_path(file_name, device);
   if (format == LLVM)
     program = clCreateProgramWithLLVMIntel(ctx, 1, &device, ker_path, &status);
-- 
1.8.3.2

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

Reply via email to