From 9e5fce3ae104bf67a9bb6578e73679a833e21434 Mon Sep 17 00:00:00 2001 From: Ian Elliott Date: Thu, 5 Feb 2015 15:19:15 -0700 Subject: Fix unitialized value in xglCreateInstance(). This causes a problem when no ICD is found. The function's "res" variable is returned despite never being intialized. For now, I chose to return XGL_ERROR_INCOMPATIBLE_DRIVER. --- loader/loader.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'loader/loader.c') diff --git a/loader/loader.c b/loader/loader.c index 2ea37e71..6dd4013f 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -872,8 +872,9 @@ LOADER_EXPORT XGL_RESULT XGLAPI xglCreateInstance( scanned_icds = scanned_icds->next; } - if (ptr_instance->icds == NULL) - return res; + if (ptr_instance->icds == NULL) { + return XGL_ERROR_INCOMPATIBLE_DRIVER; + } *pInstance = (XGL_INSTANCE) ptr_instance; return XGL_SUCCESS; -- cgit v1.2.3