diff options
author | Homer Hsing <homer.xing@intel.com> | 2013-11-08 10:57:42 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2013-11-08 13:15:10 +0800 |
commit | 67e5ceaeb811aadc9de45f624fb609e86c9c837a (patch) | |
tree | 86a1da1e3af57115145b7b515af694f1a2b3d37f /utests/runtime_createcontext.cpp | |
parent | a4c180730d072e3178f63a1f6b8dc6d4a402ecc3 (diff) | |
download | beignet-67e5ceaeb811aadc9de45f624fb609e86c9c837a.tar.gz |
release context in runtime_createcontextfromtype
Signed-off-by: Homer Hsing <homer.xing@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'utests/runtime_createcontext.cpp')
-rw-r--r-- | utests/runtime_createcontext.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/utests/runtime_createcontext.cpp b/utests/runtime_createcontext.cpp index b90e9158..f08a1898 100644 --- a/utests/runtime_createcontext.cpp +++ b/utests/runtime_createcontext.cpp @@ -3,9 +3,12 @@ void runtime_createcontextfromtype(void) { cl_int status; - if (clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU, NULL, NULL, &status) == NULL) { + cl_context ctx; + ctx = clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU, NULL, NULL, &status); + if (ctx == NULL) { OCL_THROW_ERROR("runtime_createcontextfromtype", status); } + clReleaseContext(ctx); } MAKE_UTEST_FROM_FUNCTION(runtime_createcontextfromtype); |