diff options
author | Luo Xionghu <xionghu.luo@intel.com> | 2014-09-17 05:58:17 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-09-17 11:50:57 +0800 |
commit | 4d7dbc769144346e65f122f2eb9bd19f234b4250 (patch) | |
tree | 27a1736c6e4f42911984baa044351917f806186c | |
parent | ae03de384650f5ae8225ad6ee618b79a09a28f2a (diff) |
fix utest memory leak.
Signed-off-by: Luo Xionghu <xionghu.luo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
-rw-r--r-- | utests/builtin_kernel_max_global_size.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utests/builtin_kernel_max_global_size.cpp b/utests/builtin_kernel_max_global_size.cpp index c777564..e6910cd 100644 --- a/utests/builtin_kernel_max_global_size.cpp +++ b/utests/builtin_kernel_max_global_size.cpp @@ -18,12 +18,13 @@ void builtin_kernel_max_global_size(void) OCL_ASSERT(builtin_kernel_1d != NULL); size_t param_value_size; void* param_value; - clGetKernelWorkGroupInfo(builtin_kernel_1d, device, CL_KERNEL_GLOBAL_WORK_SIZE, 0, NULL, ¶m_value_size); + OCL_CALL(clGetKernelWorkGroupInfo, builtin_kernel_1d, device, CL_KERNEL_GLOBAL_WORK_SIZE, 0, NULL, ¶m_value_size); param_value = malloc(param_value_size); - clGetKernelWorkGroupInfo(builtin_kernel_1d, device, CL_KERNEL_GLOBAL_WORK_SIZE, param_value_size, param_value, 0); + OCL_CALL(clGetKernelWorkGroupInfo, builtin_kernel_1d, device, CL_KERNEL_GLOBAL_WORK_SIZE, param_value_size, param_value, 0); OCL_ASSERT(*(size_t*)param_value == 256 * 1024 *1024); clReleaseKernel(builtin_kernel_1d); clReleaseProgram(built_in_prog); + free(built_in_kernel_names); free(param_value); } |