glsl: Fix hypothetical NULL dereference in ast_process_structure_or_interface_block
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 8 Apr 2013 23:37:04 +0000 (16:37 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 12 Apr 2013 23:24:39 +0000 (16:24 -0700)
commit278c9af85e910f4625427c4e4ac27acf6eac02bf
tree4ffc5449726eb07c1644555ef3a3035ad8bff338
parentc6a86fb5639977f37a1403012669cdee86bbd89f
glsl: Fix hypothetical NULL dereference in ast_process_structure_or_interface_block

Fixes issue identified by Klocwork analysis:

    Pointer 'field_type' returned from call to function 'glsl_type' at
    line 4126 may be NULL and may be dereferenced at line 4139.  Also
    there are 2 similar errors on line(s) 4165, 4174.

In practice, it should be impossible to actually get NULL in here
because a syntax error would have already caused compilation to halt.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/ast_to_hir.cpp