mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Fix memory leaks (#1378)
* Fix memory leaks Fixed memory leaks in: buffers, basic, and vectors * Formatting fixes Co-authored-by: oramirez <oramirez@qti.qualcomm.com>
This commit is contained in:
committed by
GitHub
parent
51c6d97d2f
commit
06415f8b79
@@ -763,7 +763,6 @@ int test_buffer_read_async( cl_device_id deviceID, cl_context context, cl_comman
|
||||
{
|
||||
clProgramWrapper program[5];
|
||||
clKernelWrapper kernel[5];
|
||||
clEventWrapper event;
|
||||
void *outptr[5];
|
||||
void *inptr[5];
|
||||
size_t global_work_size[3];
|
||||
@@ -805,6 +804,7 @@ int test_buffer_read_async( cl_device_id deviceID, cl_context context, cl_comman
|
||||
for (src_flag_id = 0; src_flag_id < NUM_FLAGS; src_flag_id++)
|
||||
{
|
||||
clMemWrapper buffer;
|
||||
clEventWrapper event;
|
||||
outptr[i] = align_malloc(ptrSizes[i] * num_elements, min_alignment);
|
||||
if ( ! outptr[i] ){
|
||||
log_error( " unable to allocate %d bytes for outptr\n", (int)(ptrSizes[i] * num_elements) );
|
||||
@@ -900,7 +900,6 @@ int test_buffer_read_array_barrier( cl_device_id deviceID, cl_context context, c
|
||||
{
|
||||
clProgramWrapper program[5];
|
||||
clKernelWrapper kernel[5];
|
||||
clEventWrapper event;
|
||||
void *outptr[5], *inptr[5];
|
||||
size_t global_work_size[3];
|
||||
cl_int err;
|
||||
@@ -941,6 +940,7 @@ int test_buffer_read_array_barrier( cl_device_id deviceID, cl_context context, c
|
||||
for (src_flag_id = 0; src_flag_id < NUM_FLAGS; src_flag_id++)
|
||||
{
|
||||
clMemWrapper buffer;
|
||||
clEventWrapper event;
|
||||
outptr[i] = align_malloc(ptrSizes[i] * num_elements, min_alignment);
|
||||
if ( ! outptr[i] ){
|
||||
log_error( " unable to allocate %d bytes for outptr\n", (int)(ptrSizes[i] * num_elements) );
|
||||
|
||||
Reference in New Issue
Block a user