From 39e3cda2f23cbe77216bdb5b452789cc3e00f011 Mon Sep 17 00:00:00 2001 From: Pan Xiuli Date: Thu, 5 May 2016 14:42:17 +0800 Subject: Utest: Fix utest memleaks Free all memory allocated and release all cl objects. Signed-off-by: Pan Xiuli Reviewed-by: Yang Rong --- utests/utest_helper.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'utests/utest_helper.cpp') diff --git a/utests/utest_helper.cpp b/utests/utest_helper.cpp index 9696dac7..4d2d4df6 100644 --- a/utests/utest_helper.cpp +++ b/utests/utest_helper.cpp @@ -365,6 +365,7 @@ cl_kernel_link(const char *file_name, const char *kernel_name, const char * link program = clLinkProgram(ctx, 1, &device, link_opt, 1, input_programs, NULL, NULL, &status); OCL_ASSERT(program != NULL); OCL_ASSERT(status == CL_SUCCESS); + clReleaseProgram(input_programs[0]); } /* Create a kernel from the program */ -- cgit v1.2.1