From 193888fd7578fed0afd8e8f22a346dc127952da7 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 24 Nov 2020 18:51:10 -0800 Subject: [PATCH] glsl: Initialize glsl_type member name. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix defect reported by Coverity Scan. Uninitialized pointer field (UNINIT_CTOR) uninit_member: Non-static class member name is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Vinson Lee Reviewed-by: Marek Olšák Part-of: --- src/compiler/glsl_types.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index f5cc1742c17..98d962481e1 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -175,6 +175,8 @@ glsl_type::glsl_type(const glsl_type *return_type, this->mem_ctx = ralloc_context(NULL); assert(this->mem_ctx != NULL); + this->name = ralloc_strdup(this->mem_ctx, ""); + this->fields.parameters = rzalloc_array(this->mem_ctx, glsl_function_param, num_params + 1);