loader: initialize memory
authorCourtney Goeltzenleuchter <courtney@LunarG.com>
Tue, 28 Oct 2014 16:29:27 +0000 (10:29 -0600)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Wed, 29 Oct 2014 23:59:29 +0000 (17:59 -0600)
uninitialized use from by valgrind

loader/loader.c

index 474589d..fddbc24 100644 (file)
@@ -188,6 +188,8 @@ loader_icd_create(const char *filename)
     if (!icd)
         return NULL;
 
+    memset(icd, 0, sizeof(*icd));
+
     icd->handle = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
     if (!icd->handle) {
         loader_log(XGL_DBG_MSG_WARNING, 0, dlerror());