mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
compiler: fix memory leak from unnecessary strdup (#1761)
The result of the `strdup` was never freed. The string duplication isn't necessary, so remove it. Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
50f9f06323
commit
2e88013b34
@@ -462,7 +462,7 @@ int test_large_multiple_embedded_headers(cl_context context, cl_device_id device
|
||||
header_names[i] = _strdup(buffer);
|
||||
|
||||
sprintf(buffer, composite_kernel_extern_template, i);
|
||||
const char* line = _strdup(buffer);
|
||||
const char *line = buffer;
|
||||
error = create_single_kernel_helper_create_program(context, &headers[i], 1, &line);
|
||||
if( headers[i] == NULL || error != CL_SUCCESS )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user