summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorJakob Sinclair <[email protected]>2016-06-04 01:09:52 +0200
committerIago Toral Quiroga <[email protected]>2016-06-07 08:13:25 +0200
commitb450f29073c4129896fce37699ef3d7f152ed458 (patch)
treefe9617ede87de475e8cc1b9d8b1246507f31063e /src/compiler/glsl/glsl_parser_extras.cpp
parentc295923d139b2c2daf169c94d9edcca23527289b (diff)
glsl: initialise pointer to NULL
Could cause issues if you tried to read from an uninitialised pointer. This just initalises the pointer to null to avoid that being a problem. Discovered by Coverity. CID: 1343616 Signed-off-by: Jakob Sinclair <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/compiler/glsl/glsl_parser_extras.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index fde8c193597..09f74772659 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -1603,6 +1603,7 @@ ast_struct_specifier::ast_struct_specifier(const char *identifier,
name = identifier;
this->declarations.push_degenerate_list_at_head(&declarator_list->link);
is_declaration = true;
+ layout = NULL;
}
void ast_subroutine_list::print(void) const