aboutsummaryrefslogtreecommitdiff
path: root/loader/loader.c
diff options
context:
space:
mode:
authorIan Elliott <ian@LunarG.com>2015-02-05 15:19:15 -0700
committerIan Elliott <ian@lunarg.com>2015-02-06 16:43:35 -0700
commit9e5fce3ae104bf67a9bb6578e73679a833e21434 (patch)
tree74f6fcddaf66176c2042627df2f2d9869cb52051 /loader/loader.c
parent276d98255fe75d6bd625c25beb79953e0e5599a4 (diff)
downloadusermoji-9e5fce3ae104bf67a9bb6578e73679a833e21434.tar.xz
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.
Diffstat (limited to 'loader/loader.c')
-rw-r--r--loader/loader.c5
1 files changed, 3 insertions, 2 deletions
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;