fix memory leak from argList and from wrong ordering of free and return statement (#1792)

This commit is contained in:
Vishal Patil
2023-08-29 21:49:45 +05:30
committed by GitHub
parent 8fd55dc889
commit c511ac62b0
2 changed files with 2 additions and 1 deletions

View File

@@ -326,6 +326,7 @@ int main(int argc, const char *argv[])
else if ( strcmp( argv[i], "--help" ) == 0 || strcmp( argv[i], "-h" ) == 0 )
{
printUsage( argv[0] );
free(argList);
return -1;
}

View File

@@ -799,8 +799,8 @@ int test_kernel_required_group_size(cl_device_id deviceID, cl_context context, c
test_error(error, "clFinish failed");
if (max_dimensions == 2) {
return 0;
free(source);
return 0;
}
local[1]--; local[2]++;