From: Jakob Sinclair Date: Fri, 3 Jun 2016 23:09:52 +0000 (+0200) Subject: glsl: initialise pointer to NULL X-Git-Tag: upstream/17.1.0~8912 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b450f29073c4129896fce37699ef3d7f152ed458;p=platform%2Fupstream%2Fmesa.git 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 Reviewed-by: Iago Toral Quiroga --- diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index fde8c19..09f7477 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