diff options
author | Homer Hsing <homer.xing@intel.com> | 2013-11-05 13:08:15 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2013-11-07 14:17:58 +0800 |
commit | ac4455cf1293b5c22147be8f9cb25a8fe32fc939 (patch) | |
tree | b3f03f39621efb8a2c7d3ec073a4b04b96b40665 /utests/utest_helper.cpp | |
parent | 5c128dcbb6593297394ad5a62b45a0a28f3dbb6b (diff) | |
download | beignet-ac4455cf1293b5c22147be8f9cb25a8fe32fc939.tar.gz |
release previous program in cl_kernel_init
Signed-off-by: Homer Hsing <homer.xing@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
Diffstat (limited to 'utests/utest_helper.cpp')
-rw-r--r-- | utests/utest_helper.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/utests/utest_helper.cpp b/utests/utest_helper.cpp index e97f43f6..65af7275 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); |