[Mesa-dev] [PATCH] glsl linker: Initialize member variable interface_namespace.

Vinson Lee vlee at freedesktop.org
Thu May 23 23:54:24 PDT 2013


Fixes "Uninitialized pointer field" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/glsl/lower_named_interface_blocks.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/glsl/lower_named_interface_blocks.cpp b/src/glsl/lower_named_interface_blocks.cpp
index eba667a..922cc02 100644
--- a/src/glsl/lower_named_interface_blocks.cpp
+++ b/src/glsl/lower_named_interface_blocks.cpp
@@ -72,7 +72,8 @@ public:
    hash_table *interface_namespace;
 
    flatten_named_interface_blocks_declarations(void *mem_ctx)
-      : mem_ctx(mem_ctx)
+      : mem_ctx(mem_ctx),
+        interface_namespace(NULL)
    {
    }
 
-- 
1.8.2.1



More information about the mesa-dev mailing list