Skip to content

Commit

Permalink
compiler: fix memory leak
Browse files Browse the repository at this point in the history
The `test_compiler compiler_defines_for_extensions` test did not free
all `malloc`'ed memory.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
  • Loading branch information
svenvh committed Apr 18, 2024
1 parent 7dc9593 commit 4358973
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,13 @@ int test_compiler_defines_for_extensions(cl_device_id device, cl_context context
// cleanup
free(data);
free(kernel_code);
for(i=0; i<num_of_supported_extensions; i++) {
free(extensions_supported[i]);
for (i = 0; i < num_of_supported_extensions; i++)
{
free(extensions_supported[i]);
}
for (i = 0; i < num_not_supported_extensions; i++)
{
free(extensions_not_supported[i]);
}
free(extensions);

Expand Down

0 comments on commit 4358973

Please sign in to comment.