glsl: fixed uninitialized pointer
authorJakob Sinclair <sinclair.jakob@openmailbox.org>
Wed, 11 May 2016 12:10:19 +0000 (14:10 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 12 May 2016 07:46:36 +0000 (09:46 +0200)
commit18f7c88dd692409935bd74f82dc48f524cf951f6
treef87dece7cc65542de89b499f51d9714666f4cc22
parentba3f0b6d5920165c735d51500544da8c29b09060
glsl: fixed uninitialized pointer

Class "ir_constant" had a bunch of constructors where the pointer member
"array_elements" had not been initialized. This could have lead to unsafe
code if something had tried to write anything to it. This patch fixes
this issue by initializing the pointer to NULL in all the constructors.
This issue was discovered by Coverity.

CID: 401603, 401604, 401605, 401610

Signed-off-by: Jakob Sinclair <sinclair.jakob@openmailbox.org>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
src/compiler/glsl/ir.cpp