diff options
author | Vishal Patil <70944016+incognito1729@users.noreply.github.com> | 2023-08-29 21:49:45 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-29 09:19:45 -0700 |
commit | c511ac62b095a6d54a34f188aa7e87c62c2fa98a (patch) | |
tree | f2789f265fbbeec80cce94045aabaff7e913dfb2 | |
parent | 8fd55dc889a7e5dacd4c15a41e7703890310dacd (diff) | |
download | OpenCL-CTS-c511ac62b095a6d54a34f188aa7e87c62c2fa98a.tar.gz |
fix memory leak from argList and from wrong ordering of free and return statement (#1792)
-rw-r--r-- | test_conformance/allocations/main.cpp | 1 | ||||
-rw-r--r-- | test_conformance/api/test_queries.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/test_conformance/allocations/main.cpp b/test_conformance/allocations/main.cpp index 43e81277..827072fc 100644 --- a/test_conformance/allocations/main.cpp +++ b/test_conformance/allocations/main.cpp @@ -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; } diff --git a/test_conformance/api/test_queries.cpp b/test_conformance/api/test_queries.cpp index fa5c227f..92ae1d7b 100644 --- a/test_conformance/api/test_queries.cpp +++ b/test_conformance/api/test_queries.cpp @@ -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]++; |