mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Fix double release of object in test_api and test_gl (#1287)
* Fix clang format only * Fix double release of objects
This commit is contained in:
committed by
GitHub
parent
b500da5fbc
commit
12637114ac
@@ -52,12 +52,7 @@ int test_context_destructor_callback(cl_device_id deviceID, cl_context context,
|
||||
test_error(error, "Unable to set destructor callback");
|
||||
|
||||
// Now release the context, which SHOULD call the callbacks
|
||||
error = clReleaseContext(localContext);
|
||||
test_error(error, "Unable to release local context");
|
||||
|
||||
// Note: since we manually released the context, we need to set it to NULL
|
||||
// to prevent a double-release
|
||||
localContext = NULL;
|
||||
localContext.reset();
|
||||
|
||||
// At this point, all three callbacks should have already been called
|
||||
int numErrors = 0;
|
||||
|
||||
Reference in New Issue
Block a user