Otherwise, if you have ICDs installed and none successfully dlopen, you
end up freeing uninitialized/invalid memory.

Signed-off-by: Aaron Watry <[email protected]>

Discovered after an upgrade where I forgot to build mesa into clover, and
the nvidia icd was left around with no library to back it.
---
 tests/util/piglit-framework-cl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/util/piglit-framework-cl.c b/tests/util/piglit-framework-cl.c
index 9dc73c7..235f160 100644
--- a/tests/util/piglit-framework-cl.c
+++ b/tests/util/piglit-framework-cl.c
@@ -194,7 +194,7 @@ int piglit_cl_framework_run(int argc, char** argv)
 
                bool platform_defined;
                unsigned int num_platforms;
-               cl_platform_id* platform_ids;
+               cl_platform_id* platform_ids = NULL;
 
                /* Create regexes */
                if(   config->platform_regex != NULL
-- 
2.9.3

_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to