[2/3] Utest: fix a build-in program leak.

Submitted by Yang, Rong R on June 20, 2017, 11:07 a.m.

Details

Message ID 1497956867-27364-2-git-send-email-rong.r.yang@intel.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Yang, Rong R June 20, 2017, 11:07 a.m.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
---
 utests/enqueue_built_in_kernels.cpp | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/utests/enqueue_built_in_kernels.cpp b/utests/enqueue_built_in_kernels.cpp
index 52b8848..2afbabd 100644
--- a/utests/enqueue_built_in_kernels.cpp
+++ b/utests/enqueue_built_in_kernels.cpp
@@ -14,6 +14,7 @@  void enqueue_built_in_kernels(void)
   OCL_ASSERT(ret_sz == built_in_kernels_size);
   cl_program built_in_prog = clCreateProgramWithBuiltInKernels(ctx, 1, &device, built_in_kernel_names, &err);
   OCL_ASSERT(built_in_prog != NULL);
+  clReleaseProgram(built_in_prog);
 }
 
 MAKE_UTEST_FROM_FUNCTION(enqueue_built_in_kernels);