[Mesa-dev] [PATCH] glsl: Initialize ast_aggregate_initializer::constructor_type.

Matt Turner mattst88 at gmail.com
Fri Jul 12 18:25:31 PDT 2013


On Fri, Jul 12, 2013 at 5:24 PM, Vinson Lee <vlee at freedesktop.org> wrote:
> Fixes "Uninitialized pointer field" defect reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  src/glsl/ast.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/glsl/ast.h b/src/glsl/ast.h
> index 9b119ed..c0350e7 100644
> --- a/src/glsl/ast.h
> +++ b/src/glsl/ast.h
> @@ -307,7 +307,8 @@ private:
>  class ast_aggregate_initializer : public ast_expression {
>  public:
>     ast_aggregate_initializer()
> -      : ast_expression(ast_aggregate, NULL, NULL, NULL)
> +      : ast_expression(ast_aggregate, NULL, NULL, NULL),
> +        constructor_type(NULL)
>     {
>        /* empty */
>     }
> --
> 1.8.1.2

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-dev mailing list