diff options
author | Pan Xiuli <xiuli.pan@intel.com> | 2016-05-05 14:42:17 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2016-05-18 15:08:23 +0800 |
commit | 39e3cda2f23cbe77216bdb5b452789cc3e00f011 (patch) | |
tree | 2e6e069b032b5491121f615716c99a5335b1732b /utests/runtime_compile_link.cpp | |
parent | 0b296ec53faa51e384f7b5da6ddff3ed8a0729f4 (diff) | |
download | beignet-39e3cda2f23cbe77216bdb5b452789cc3e00f011.tar.gz |
Utest: Fix utest memleaks
Free all memory allocated and release all cl objects.
Signed-off-by: Pan Xiuli <xiuli.pan@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'utests/runtime_compile_link.cpp')
-rw-r--r-- | utests/runtime_compile_link.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utests/runtime_compile_link.cpp b/utests/runtime_compile_link.cpp index 4a39b6a7..48c3fa1b 100644 --- a/utests/runtime_compile_link.cpp +++ b/utests/runtime_compile_link.cpp @@ -157,6 +157,14 @@ void runtime_compile_link(void) } OCL_UNMAP_BUFFER(2); OCL_DESTROY_KERNEL_KEEP_PROGRAM(true); + clReleaseProgram(foo_pg); + clReleaseProgram(myinc_pg); + clReleaseProgram(program_A); + clReleaseProgram(program_B); + clReleaseProgram(linked_program); + clReleaseProgram(new_linked_program); + clReleaseProgram(program_with_binary); + free(binary); } MAKE_UTEST_FROM_FUNCTION(runtime_compile_link); |